This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: GDB cannot find line info
Hi,
Merging the patch mentioned earlier does fix most of the regressions I
introduced after "fixing" our compiler, but there is still 1 regression
left, which I fail to understand.
In langs.exp, I have now 1 failure:
up
#3 0x080003e4 in fsub_ ()
Current language: auto; currently fortran
(gdb) FAIL: gdb.base/langs.exp: up to fsub in langs.exp
Remember, the difference between a "langs" executable that passes the
test, and one that fails is the correct inclusion of the full dirname of
the source file in the debug_line directory table.
I am using GDB 6.8 ported to ST200.
I have dumped the debug information in various ways:
* As suggested by Joel, with MI -symbol-list-lines
Gives the very same results in both cases:
(gdb) -symbol-list-lines langs1.c
^done,lines=[{pc="0x080003a0",line="24"},{pc="0x080003a4",line="0"},{pc="0x080003a4",line="25"},{pc="0x080003a8",line="0"},{pc="0x080
3a8",line="0"},{pc="0x080003b0",line="0"},{pc="0x080003bc",line="0"}]
(gdb) -symbol-list-lines langs1.f
^done,lines=[{pc="0x080003a8",line="5"},{pc="0x080003b0",line="0"},{pc="0x080003b0",line="6"},{pc="0x080003bc",line="0"},{pc="0x08000
c",line="6"},{pc="0x080003c8",line="0"}]
* Using "maintenance print symbols":
- in the failing case, the data for "langs1.f" is dumped first, while it
appears at the end of the dump in the other case.
- in the failing case, langs1.c is prefixed with its full path name.
* Using readelf -wl:
- the failing case has 1 entry in the directory table for langs1.o (full
dirname for langs1.c) and langs1.c references it.
- In the executable which passes the test, the directory table for
langs1.o is empty, and langs1.c has "0" as directory.
In both cases, langs1.f has "0" as directory.
* Using dwarfdump on langs1.o,
- DW_AT_decl_file attributes pointing to langs1.c show the full path in
the failing case, and langs1.f (full path) has the hostname as prefix.
- In the object file which passes the test, the full path of langs1.c
and langs1.f has always the hostname as prefix.
- the same difference appears in the debug_line dump.
It looks a bit like the problem I had several months ago
(http://sourceware.org/ml/gdb-patches/2009-03/msg00617.html).
All the information I managed to dump looks correct to me, but GDB is
still unhappy :-(
Any suggestion appreciated :-)
Thanks
Christophe.