This is the mail archive of the gdb-patches@sources.redhat.com 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: Ping: Re: testcase for "absolute source" patch


Hello Michael,

On Tue, Oct 12, 2004 at 09:37:07AM -0400, Michael Chastain wrote:
> These would make good comments to add to the test script.
...
> Okay, I am looking at gdb.log and there is not enough trace information
> about what directory is being tested.

Added.


> I'm getting four FAIL results with gdb HEAD:
> 
>   gdb.base/openp.exp: openp s1-da (non-existent source, basename, find in <dir>/$cdir/basename)
>   gdb.base/openp.exp: openp s3-da (non-existent source, relative name, find in <dir>/$cdir/relative)
>   gdb.base/openp.exp: openp s4-da (non-existent source, in the current dir, find in <dir>/$cdir/basename)
>   gdb.base/openp.exp: openp s5-da (non-existent source, in the upper dir, find in <dir>/$cdir/relative)
> 
> Are these bugs in gdb or problems with the test script?

These are cases I was not sure about and asked for help in
http://sources.redhat.com/ml/gdb-patches/2004-08/msg00539.html . At the
moment, gdb performs the following sequence while looking for a source
file in case s1-da (compiled in $cdir as basename, <dir> in source path
(i.e., "directory <dir>" has been previously executed), we are in $cwd):

1. try basename;

2. try <dir>/basename;

3. fail.

The question is, should gdb try <dir>/$cdir/basename after step 2? This
is not implemented right now, but could help people compiling the
sources as basename in each directory (i.e., they call make recursively
and do "gcc foo.c" without a path) and having the compilation tree under
some directory on the gdb host (which, I think, was the idea behind the
"directory" command).

As the file opening mechanism gets more and more complex, we should have
a clear policy what we do and what we don't. That is why I wanted to
hear others' opinions. If you say "no, we shouldn't append $cdir after
<dir>", then I convert these FAILs into PASSes.


With kind regards,
Baurjan.


2004-10-15  Baurjan Ismagulov  <ibr@ata.cs.hun.edu.tr>

	* gdb.base/openp.c: New testcase.
	* gdb.base/openp.exp: New testcase checking for source, binary
	and compilation directory handling.

Attachment: openp.exp
Description: Text document

int main(){return 0;}

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