[PATCH] decoded output of .debug_line from readelf -wL

Torleif Sandnes torleif.sandnes@gmail.com
Thu Apr 10 20:46:00 GMT 2008


>  I see it now : )
>  Thanks to Caro for pointing it out in the first place, and to Daniel
>  for pointing out the obvious.

It seems that subtracting 1 from the directory index was wrong after all:

>From section 6.2.5.3 of the dwarf 3 standard document:
"The directory index represents an entry in the include_directories
section of the line
number program header. The index is LEB128(0) if the file was found in
the current
directory of the compilation, LEB128(1) if it was found in the first
directory in the
include_directories section, and so on. The directory index is ignored
for file names that
represent full path names."

So 0 means the compilation directory and directory indices start counting at 1.

I think I got it right this time

Cary: Sorry for misspelling your name in my last post.

Torleif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: decodedline.patch
Type: text/x-patch
Size: 22547 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20080410/a88557aa/attachment.bin>


More information about the Binutils mailing list