This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] decoded output of .debug_line from readelf -wL
- From: "Cary Coutant" <ccoutant at google dot com>
- To: "Torleif Sandnes" <torleif dot sandnes at gmail dot com>
- Cc: "Nick Clifton" <nickc at redhat dot com>, binutils at sourceware dot org
- Date: Wed, 9 Apr 2008 15:57:18 -0700
- Subject: Re: [PATCH] decoded output of .debug_line from readelf -wL
- References: <dfb869080702250731l324dd289mdff9dc34ce4dcedd@mail.gmail.com> <45E426FA.8090401@redhat.com> <dfb869080804090251o2c678718hbe4f981a1a4c4c0b@mail.gmail.com>
Nice. I was just wanting something like this, and was about to do it myself.
Found a bug at dwarf.c:2610 in display_debug_lines_decoded:
case DW_LNS_set_file:
adv = read_leb128 (data, & bytes_read, 0);
data += bytes_read;
state_machine_regs.file = adv;
printf (_("\n%s/%s:\n"),
directory_table[file_table[state_machine_regs.file -
1].directory_index],
file_table[state_machine_regs.file - 1].name);
break;
That should be "directory_index - 1", I believe.
A couple of suggestions:
1. It would be nice to show a break in the output where there's an
end_sequence opcode.
2. The column headings would match the rest of readelf better if they
weren't all caps and followed by a colon.
Thanks for doing this!
-cary