]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix a bug displaying the interpretation of a CFA block that just contains DW_CFA_NOP...
authorNick Clifton <nickc@redhat.com>
Thu, 2 Jun 2016 10:34:49 +0000 (11:34 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 2 Jun 2016 10:34:49 +0000 (11:34 +0100)
* dwarf.c (display_debug_frames): Do not display any
interpretation if the block consists solely of DW__CFA_NOPs.

binutils/ChangeLog
binutils/dwarf.c

index ee277632307a47d49cd0fdca482add9eff22408e..9dfaf2b8f278c534bc1fbfb0acf5f717f0ed7ca6 100644 (file)
@@ -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.
index 770fa6bf5c6b6edaa7b10d2b7e184b9a54c668cd..282e069958d1d59fd8a05a6e451d98ba62a325e7 100644 (file)
@@ -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;