This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [testsuite] dg-final { gdb-test { .. } } support
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Alexandre Oliva <aoliva at redhat dot com>, gcc-patches at gcc dot gnu dot org, jan dot kratochvil at redhat dot com
- Date: Thu, 17 Sep 2009 15:52:47 +0000 (UTC)
- Subject: Re: [testsuite] dg-final { gdb-test { .. } } support
- References: <20090917145044.GO14664@tyan-ft48-01.lab.bos.redhat.com>
On Thu, 17 Sep 2009, Jakub Jelinek wrote:
> + if [info exists ::env(GUALITY_GDB_NAME)] {
> + set gdb_name "$::env(GUALITY_GDB_NAME)"
> + } else {
> + set gdb_name "gdb"
> + }
It would be better to use the standard DejaGnu logic for finding GDB (even
if an extra case for GUALITY_GDB_NAME is needed as well).
global GDB
if ![info exists GDB] {
set GDB [transform gdb]
}
That way, any GDB specified in site.exp will be used, just as for the GDB
testsuite.
> + set fd [open "| $gdb_name -nw -nx -quiet -x $cmd_file ./$output_file 2>/dev/null" r]
Start GDB with "remote_spawn host" rather than a local pipe, then interact
with remote_expect etc..
--
Joseph S. Myers
joseph@codesourcery.com