[PATCH] decoded output of .debug_line from readelf -wL
Cary Coutant
ccoutant@google.com
Wed Apr 9 22:57:00 GMT 2008
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
More information about the Binutils
mailing list