aboutsummaryrefslogtreecommitdiff
path: root/binutils/NEWS
diff options
context:
space:
mode:
authorThomas Troeger <tstroege@gmx.de>2020-01-13 12:36:55 +0000
committerNick Clifton <nickc@redhat.com>2020-01-13 12:36:55 +0000
commit1d67fe3b6e696fccb902d9919b9e58b7299a3205 (patch)
tree84e284092b19da0c349671ccc287d8afd7c1c4b6 /binutils/NEWS
parenta4f2b7c5d931f2aa27851b59ae5817a6ee43cfcb (diff)
downloadgdb-1d67fe3b6e696fccb902d9919b9e58b7299a3205.zip
gdb-1d67fe3b6e696fccb902d9919b9e58b7299a3205.tar.gz
gdb-1d67fe3b6e696fccb902d9919b9e58b7299a3205.tar.bz2
Add an option to objdump's disassembler to generate ascii art diagrams showing the destinations of flow control instructions.
binutils* objdump.c (visualize_jumps, color_output, extended_color_output) (detected_jumps): New variables. (usage): Add the new jump visualization options. (option_values): Add new option value. (long_options): Add the new option. (jump_info_new, jump_info_free): New functions. (jump_info_min_address, jump_info_max_address): Likewise. (jump_info_end_address, jump_info_is_start_address): Likewise. (jump_info_is_end_address, jump_info_size): Likewise. (jump_info_unlink, jump_info_insert): Likewise. (jump_info_add_front, jump_info_move_linked): Likewise. (jump_info_intersect, jump_info_merge): Likewise. (jump_info_sort, jump_info_visualize_address): Likewise. (disassemble_jumps): New function - used to locate jumps. (disassemble_bytes): Add ascii art generation. (disassemble_section): Add scan to locate jumps. (main): Parse the new visualization option. * doc/binutils.texi: Document the new feature. * NEWS: Mention the new feature. opcodes * arm-dis.c (print_insn_arm): Fill in insn info fields for control flow instructions. (print_insn_thumb16, print_insn_thumb32): Likewise. (print_insn): Initialize the insn info. * i386-dis.c (print_insn): Initialize the insn info fields, and detect jumps.
Diffstat (limited to 'binutils/NEWS')
-rw-r--r--binutils/NEWS19
1 files changed, 19 insertions, 0 deletions
diff --git a/binutils/NEWS b/binutils/NEWS
index 72a9644..92ec6bc 100644
--- a/binutils/NEWS
+++ b/binutils/NEWS
@@ -15,6 +15,25 @@
* Add --keep-section option to objcopy and strip. This option keeps the
specified section from being removed.
+ * Add visualization of jumps inside a function by drawing an ascii character
+ graph between the address and the disassembler column. Enabled via the
+ --visualize-jumps command line option for objdump. Currently supported by
+ the x86, x86_64, and ARM targets. The output looks something like this:
+
+ c6: | | \----------> be 00 00 00 00 mov $0x0,%esi
+ cb: | | /----> 48 8b 3d 00 00 00 00 mov 0x0(%rip),%rdi # d2 <main+0xd2>
+ d2: | | | 31 c0 xor %eax,%eax
+ d4: | | | /-- e8 00 00 00 00 callq d9 <main+0xd9>
+ d9: | | | \-> bf 02 00 00 00 mov $0x2,%edi
+ de: | +-----------|----- e8 00 00 00 00 callq e3 <main+0xe3>
+ e3: | \-----------|----> 48 89 da mov %rbx,%rdx
+ e6: | | be 00 00 00 00 mov $0x0,%esi
+ eb: | \----- eb de jmp cb <main+0xcb>
+ ed: \-------------------> 48 8b 16 mov (%rsi),%rdx
+
+ Additional arguments to the --visualize-jumps option add colors to the
+ output.
+
Changes in 2.33:
* Add --source-comment[=<txt>] option to objdump which if present,