This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] Handle unsupported "-shared" in gdb1555.exp test
- From: Daniel Jacobowitz <drow at false dot org>
- To: fnf at redhat dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 25 Feb 2004 00:19:10 -0500
- Subject: Re: [RFA] Handle unsupported "-shared" in gdb1555.exp test
- References: <200402242157.59177.fnf@ninemoons.com>
On Tue, Feb 24, 2004 at 09:57:59PM -0700, Fred Fish wrote:
> There are 8 gdb tests that attempt to create a shared file using the
> "-shared" option:
>
> gdb.base/gdb1555.exp
> gdb.base/pending.exp
> gdb.base/shlib-call.exp
> gdb.base/shreloc.exp:51
> gdb.base/so-impl-ld.exp
> gdb.base/so-indr-cl.exp
> gdb.base/solib.exp:101
> gdb.threads/tls-shared.exp
>
> All of them, with the exception of gdb1555.exp and tls-shared.exp,
> first do some test to see if this is expected to work for the target.
This suggests that we need code in lib/gdb.exp to:
- check whether shared library tests should be run
- build shared libraries
> I propose that the gdb1555.exp test use the "isnative" check.
> Attached is a patch for review and comment.
Please don't. I run cross-debugger tests which should test shared
library support on a regular basis. I know this disagrees with prior
art in the testsuite, but I would prefer not to propogate it further.
How about something like:
proc gdb_compile_solib { whatever } {
if {[istarget whatever]} {
return -1
}
whatever
}
and using that to issue an unsupported (or silently return, I don't
know which is the accepted practice).
An alternative would be inclusive lists: {[istarget *-*-linux*] ||
[istarget *-*-bsd*] || ...} and so on as we teach the function how to
build shared libraries in different settings. This might be the best
idea.
It is at this point that in any conversation about building shared
librares that someone should normally suggest making the testsuite use
libtool. I give advance warning that I will do my worst to anyone who
makes such a suggestion. Libtool is a disgusting pile of dung. That's
my opinion and I'll stand by it.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer