This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: gdb.mi/*.exp and absolute line numbers
- From: Michael Chastain <mec dot gnu at mindspring dot com>
- To: cagney at gnu dot org
- Cc: jimb at redhat dot com, gdb at sources dot redhat dot com, ezannoni at redhat dot com,cagney at redhat dot com
- Date: Fri, 06 Aug 2004 12:06:21 -0400
- Subject: Re: gdb.mi/*.exp and absolute line numbers
- References: <4111FC04.nailD7G1U3QKS@mindspring.com><411399C4.9060108@gnu.org>
Andrew Cagney <cagney@gnu.org> wrote:
> (What happens with a soft-link or file copy (where the file name isn't
> in $srcdir) as is done with the asm tests).
This call would stop working:
[gdb_get_line_number "foo" arch.inc]
However this call would work fine:
[gdb_get_line_number "foo" ${asm-arch}.inc]
Fortunately there are no such calls in the corpus, so it won't hurt when
I change the semantics from "gdb looks for the file on the host machine"
to "tcl looks for the file on the build machine".
The test script always has to know the names of the files on the build
machine, in order to get them to the host machine in the first place.
Something like gdb.stabs/weird.exp would be more painful, because it
actually runs 'sed' on the *host* machine to preprocess files before
feeding them to gdb_compile. For something like that, if it called
gdb_get_line_number, I would have to rip out the call and replace
it with an explicit call to "gdb_test search".
Michael C