This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit]: Display .debug_line section contents with readelf -w


Hi Guys,

  I am applying the patch below to fix invoking readelf with just the
  "-w" command line option.  The problem at the moment is that
  although it does display all the other debug sections it ignores the
  .debug_line section.  This was because the do_debug_lines variable
  was not being set to any particular value.  So I have changed the
  behaviour so that "readelf -w" will include a raw dump of the
  .debug_line section.

  Tested on a wide variety of toolchains with no regressions.

Cheers
  Nick

binutils/ChangeLog
2009-07-17  Nick Clifton  <nickc@redhat.com>

	* dwarf.c (display_debug_lines): If do_debug_lines has not been
	set then default to displaying raw .debug_line section contents.

Index: binutils/dwarf.c
===================================================================
RCS file: /cvs/src/src/binutils/dwarf.c,v
retrieving revision 1.51
diff -c -3 -p -r1.51 dwarf.c
*** binutils/dwarf.c	14 Jul 2009 16:57:18 -0000	1.51
--- binutils/dwarf.c	17 Jul 2009 15:14:29 -0000
*************** display_debug_lines (struct dwarf_sectio
*** 2813,2818 ****
--- 2813,2821 ----
        return 0;
      }
  
+   if (do_debug_lines == 0)
+     do_debug_lines |= FLAG_DEBUG_LINES_RAW;
+ 
    if (do_debug_lines & FLAG_DEBUG_LINES_RAW)
      retValRaw = display_debug_lines_raw (section, data, end);
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]