From: Christophe LYON <christophe.lyon@st.com>
To: Joel Brobecker <brobecker@adacore.com>, gdb-patches@sources.redhat.com
Subject: Re: [PATCH] obvious pattern fix in gdb.base/step-line.exp
Date: Tue, 31 Mar 2009 15:25:00 -0000 [thread overview]
Message-ID: <49D21E7E.8080708@st.com> (raw)
In-Reply-To: <20090330170216.GB9472@adacore.com>
On 30.03.2009 19:02, Joel Brobecker wrote:
>> So... it may be an issue with my compiler handling of #line?
>
> Not quite sure from the dump what exactly causes the change of behavior,
> I would need to look at the code more precisely, and I'm a little rush
> right now.
>
> But since I believe that printing the full name is perfectly valid (in
> fact, I later verified that this is what happens with Ada files as well,
> even though the debug info looks similar to what we get with step-line.c),
> it's fine to commit your patch.
>
Hi Joel,
I have investigated a bit more... and I think I found a bug in our compiler.
But I am not 100% sure how to interpret the ANSI C spec regarding the
#line directive: when the name of the source file has no path (as in
step-line.c, where #line xx "step-line.c" is used), which path should be
considered?
Indeed, as mentioned before, my compiler generates the following file table:
Entry Dir Time Size Name
1 1 0 0 step-line.c
2 2 0 0 step-line.inp
while GCC generates:
Entry Dir Time Size Name
1 1 0 0 step-line.c
2 0 0 0 step-line.c
3 0 0 0 step-line.inp
(and uses the 2nd entry for the #line directives).
I changed my compiler to behave as GCC, and I got the same behavior
under GDB.
So... is this a bug in the test, in my compiler? If in my compiler, then
I am not sure it's a good idea to apply my fix to the testsuite :-)
Thanks,
Christophe.
next prev parent reply other threads:[~2009-03-31 13:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-27 14:05 Christophe LYON
2009-03-27 18:53 ` Joel Brobecker
2009-03-30 13:51 ` Christophe LYON
2009-03-30 18:23 ` Joel Brobecker
2009-03-31 15:25 ` Christophe LYON [this message]
2009-04-01 18:32 ` Joel Brobecker
2009-04-02 8:52 ` Christophe LYON
2009-04-17 17:07 ` Christophe LYON
2009-04-17 17:30 ` Daniel Jacobowitz
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=49D21E7E.8080708@st.com \
--to=christophe.lyon@st.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sources.redhat.com \
/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