[PATCH] decoded output of .debug_line from readelf -wL
Torleif Sandnes
torleif.sandnes@gmail.com
Thu Apr 10 09:48:00 GMT 2008
Hi Cary.
Thanks for trying the patch.
> Found a bug at dwarf.c:2610 in display_debug_lines_decoded:
...
> 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.
Hmm, I'm not entirely sure that we are seeing the same thing here.
The intent of this line is to print as much of the path to the
filename as is available,
so I first look up the directory of the current file with:
directory_table[file_table[state_machine_regs.file - 1].directory_index]
next, I look up the current file name with
file_table[state_machine_regs.file - 1].name
For readelf.c this results in:
.././binutils/../include/elf/readelf.c
at my computer.
Could you elaborate on why you think this is a bug?
> 1. It would be nice to show a break in the output where there's an
> end_sequence opcode.
I can see that this may be useful.
I will add a newline on end_sequence.
> 2. The column headings would match the rest of readelf better if they
> weren't all caps and followed by a colon.
I agree!
Regards,
Torleif
More information about the Binutils
mailing list