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: [RFA/testsuite] Shorten the maint.exp symbols tests


On 04 Dec 2002 14:47:20 -0800, David Carlton <carlton@math.Stanford.EDU> said:
> On Wed, 4 Dec 2002 17:20:32 -0500, Daniel Jacobowitz <drow@mvista.com> said:

>> Blech!  I'm not sure what to do about this.  Somehow we'd need to
>> figure out how the file was compiled - is the logic to decide this
>> in gdb_compile?  Does the compiler clean it up on its own?  Maybe if
>> we pass an explicit srcdir to gdb_compile we can get consistent
>> results here.

> It's certainly not obvious to me how to fix the testsuite in this
> situation.  After all, gdb_compile gets passed
> ${srcdir}/${subdir}/${srcfile}, which is exactly what you look for in
> your maint print symbols call ("./gdb.base/break.c" in my example), so
> I have a hard time imagining what a simple fix might be to the
> testsuite that would allow it to guess the right thing (barring some
> fragile hack like checking if $srcdir is ".").

I thought of another possible solution: maint.exp could copy
${srcdir}/${subdir}/${srcfile} to the current directory, then just
compile ${srcfile} without any path, and delete the stuff in the
current directory at the end of the tests.  That's still not a great
solution, and I think probably the ultimate solution is to teach maint
print about canonical filenames, but it might work for now.

David Carlton
carlton@math.stanford.edu


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