This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Patch] Allow readelf -wl without .debug_info
- From: Tristan Gingold <gingold at adacore dot com>
- To: binutils <binutils at sourceware dot org>
- Date: Tue, 3 Aug 2010 11:02:48 +0200
- Subject: [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;