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]

[Patch] Allow readelf -wl without .debug_info


Hi,

display_debug_lines tries to load .debug_info.  But unless I am mistaken,
this is useless and also annoying for ia64/vms as usually there is
a .debug_lines but no .debug_info.

No regressions on i386-linux.

Ok to commit ?

Tristan.

binutils/
2010-08-03  Tristan Gingold  <gingold@adacore.com>

	* dwarf.c (display_debug_lines): Mark file argument unused.
	Do not try to load .debug_info section.

Index: binutils/dwarf.c
===================================================================
RCS file: /cvs/src/src/binutils/dwarf.c,v
retrieving revision 1.70
diff -c -r1.70 dwarf.c
*** binutils/dwarf.c	24 May 2010 13:21:23 -0000	1.70
--- binutils/dwarf.c	3 Aug 2010 08:59:29 -0000
***************
*** 3056,3075 ****
  }
  
  static int
! display_debug_lines (struct dwarf_section *section, void *file)
  {
    unsigned char *data = section->start;
    unsigned char *end = data + section->size;
    int retValRaw = 1;
    int retValDecoded = 1;
  
-   if (load_debug_info (file) == 0)
-     {
-       warn (_("Unable to load/parse the .debug_info section, so cannot interpret the %s section.\n"),
-             section->name);
-       return 0;
-     }
- 
    if (do_debug_lines == 0)
      do_debug_lines |= FLAG_DEBUG_LINES_RAW;
  
--- 3056,3068 ----
  }
  
  static int
! display_debug_lines (struct dwarf_section *section, void *file ATTRIBUTE_UNUSED)
  {
    unsigned char *data = section->start;
    unsigned char *end = data + section->size;
    int retValRaw = 1;
    int retValDecoded = 1;
  
    if (do_debug_lines == 0)
      do_debug_lines |= FLAG_DEBUG_LINES_RAW;
  


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