diff options
author | Nick Clifton <nickc@redhat.com> | 2016-06-02 11:34:49 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2016-06-02 11:34:49 +0100 |
commit | 5b6312fd20ef39f1531e37e7d2601c54d5658119 (patch) | |
tree | db07c07d2cfaa231c205904dfd1170bb0433ddda | |
parent | 5b677558bc6c7b2477bb33c709e6017e68e7ae8c (diff) | |
download | fsf-binutils-gdb-5b6312fd20ef39f1531e37e7d2601c54d5658119.zip fsf-binutils-gdb-5b6312fd20ef39f1531e37e7d2601c54d5658119.tar.gz fsf-binutils-gdb-5b6312fd20ef39f1531e37e7d2601c54d5658119.tar.bz2 |
Fix a bug displaying the interpretation of a CFA block that just contains DW_CFA_NOP instructions.
* dwarf.c (display_debug_frames): Do not display any
interpretation if the block consists solely of DW__CFA_NOPs.
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/dwarf.c | 10 |
2 files changed, 14 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index ee27763..9dfaf2b 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2016-06-02 Nick Clifton <nickc@redhat.com> + + * dwarf.c (display_debug_frames): Do not display any + interpretation if the block consists solely of DW__CFA_NOPs. + 2016-05-31 Alan Modra <amodra@gmail.com> * objcopy.c: Formatting, whitespace throughout. diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 770fa6b..282e069 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -5780,6 +5780,7 @@ display_debug_frames (struct dwarf_section *section, unsigned int encoded_ptr_size = saved_eh_addr_size; unsigned int offset_size; unsigned int initial_length_size; + bfd_boolean all_nops; saved_start = start; @@ -6213,6 +6214,8 @@ display_debug_frames (struct dwarf_section *section, start = tmp; } + all_nops = TRUE; + /* Now we know what registers are used, make a second pass over the chunk, this time actually printing out the info. */ @@ -6231,6 +6234,10 @@ display_debug_frames (struct dwarf_section *section, if (op & 0xc0) op &= 0xc0; + /* Make a note if something other than DW_CFA_nop happens. */ + if (op != DW_CFA_nop) + all_nops = FALSE; + /* Warning: if you add any more cases to this switch, be sure to add them to the corresponding switch above. */ switch (op) @@ -6661,7 +6668,8 @@ display_debug_frames (struct dwarf_section *section, } } - if (do_debug_frames_interp) + /* Interpret the CFA - as long as it is not completely full of NOPs. */ + if (do_debug_frames_interp && ! all_nops) frame_display_row (fc, &need_col_headers, &max_regs); start = block_end; |