This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] obvious pattern fix in gdb.base/step-line.exp
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Christophe LYON <christophe dot lyon at st dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 1 Apr 2009 11:32:40 -0700
- Subject: Re: [PATCH] obvious pattern fix in gdb.base/step-line.exp
- References: <49CCDB3D.5010302@st.com> <20090327184726.GW9472@adacore.com> <49D083FB.6020108@st.com> <20090330170216.GB9472@adacore.com> <49D21E7E.8080708@st.com>
> 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?
Not sure either. Perhaps it's just unspecified?
> 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
> :-)
I'm OK with leaving the testcase untouched if we don't need to.
However, I think it's worth mentioning again what happens in
the Ada case:
% gnatmake -g `pwd`/foo
gcc -c -I/home/brobecke/toto/ -g -I- /home/brobecke/toto/foo.adb
gnatbind -x foo.ali
gnatlink foo.ali -g
Then inserting a breakpoint on procedure Foo:
(gdb) b foo
Breakpoint 1 at 0x401f0c: file /home/brobecke/toto/foo.adb, line 4.
In my opinion, the current behavior in that case is fine too.
--
Joel