This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] obvious pattern fix in gdb.base/step-line.exp


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]