Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Christophe LYON <christophe.lyon@st.com>
To: gdb@sourceware.org
Subject: Re: GDB cannot find line info
Date: Tue, 22 Sep 2009 16:04:00 -0000	[thread overview]
Message-ID: <4AB8F58A.5080405@st.com> (raw)
In-Reply-To: <4AB79D3E.8060806@st.com>

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.


  reply	other threads:[~2009-09-22 16:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-21  7:45 Robert Bu
2009-09-21 15:00 ` Christophe LYON
2009-09-21 15:35   ` Christophe LYON
2009-09-22 16:04     ` Christophe LYON [this message]
2009-09-25 15:37       ` Christophe LYON
  -- strict thread matches above, loose matches on Subject: below --
2009-09-18 16:12 Christophe LYON
2009-09-18 16:27 ` Frédéric RISS
2009-09-18 16:33   ` Frederic Riss
2009-09-19 16:40 ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AB8F58A.5080405@st.com \
    --to=christophe.lyon@st.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox