diff options
author | Doug Evans <dje@google.com> | 2008-11-11 01:23:34 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2008-11-11 01:23:34 +0000 |
commit | 6b8ce727297b1e40738e50f83a75881b290fe6a6 (patch) | |
tree | 41313f0b7c6916be25b8650a7e723e61adbf820d /gdb/testsuite/gdb.base | |
parent | 7bae73321367a72738afc2428faf4304222860c9 (diff) | |
download | fsf-binutils-gdb-6b8ce727297b1e40738e50f83a75881b290fe6a6.zip fsf-binutils-gdb-6b8ce727297b1e40738e50f83a75881b290fe6a6.tar.gz fsf-binutils-gdb-6b8ce727297b1e40738e50f83a75881b290fe6a6.tar.bz2 |
* lib/gdb.exp (GDBFLAGS): Move -nx ...
(INTERNAL_GDBFLAGS): ... to here. Move -nw to here as well.
(default_gdb_version): Add $INTERNAL_GDBFLAGS to gdb invocations.
(default_gdb_start,default_gdb_exit): Ditto.
* lib/mi-support.exp (default_mi_gdb_start): Ditto.
(mi_uncatched_gdb_exit): Add $INTERNAL_GDBFLAGS to log message.
* gdb.base/corefile.exp: Add $INTERNAL_GDBFLAGS to gdb invocations.
* gdb.base/dbx.exp (dbx_gdb_start): Ditto.
* gdb.base/args.exp (GDBFLAGS): Don't overwrite, append.
* gdb.base/remotetimeout.exp (GDBFLAGS): Ditto.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r-- | gdb/testsuite/gdb.base/args.exp | 11 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/corefile.exp | 13 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/dbx.exp | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/remotetimeout.exp | 2 |
4 files changed, 15 insertions, 17 deletions
diff --git a/gdb/testsuite/gdb.base/args.exp b/gdb/testsuite/gdb.base/args.exp index 372bfe1..230b0eb 100644 --- a/gdb/testsuite/gdb.base/args.exp +++ b/gdb/testsuite/gdb.base/args.exp @@ -71,7 +71,8 @@ proc args_test { name arglist } { # Test that the --args are processed correctly. # set old_gdbflags $GDBFLAGS -set GDBFLAGS "-nx --args $binfile 1 3" + +set GDBFLAGS "$old_gdbflags --args $binfile 1 3" args_test basic {{1} {3}} # @@ -79,21 +80,21 @@ args_test basic {{1} {3}} # The syntax needed is a little peculiar; DejaGNU treats the arguments as a # list and expands them itself, since no shell redirection is involved. # -set GDBFLAGS "-nx --args $binfile 1 {} 3" +set GDBFLAGS "$old_gdbflags --args $binfile 1 {} 3" args_test "one empty" {{1} {} {3}} # # try with 2 empty args # -set GDBFLAGS "-nx --args $binfile 1 {} {} 3" +set GDBFLAGS "$old_gdbflags --args $binfile 1 {} {} 3" args_test "two empty" {{1} {} {} 3} # Try with arguments containing literal single quotes. -set GDBFLAGS "-nx --args $binfile 1 '' 3" +set GDBFLAGS "$old_gdbflags --args $binfile 1 '' 3" args_test "one empty (with single quotes)" {{1} {''} {3}} -set GDBFLAGS "-nx --args $binfile 1 '' '' 3" +set GDBFLAGS "$old_gdbflags --args $binfile 1 '' '' 3" args_test "two empty (with single quotes)" {{1} {''} {''} {3}} # try with arguments containing literal newlines. diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp index 3e6c3ee..401e0c0 100644 --- a/gdb/testsuite/gdb.base/corefile.exp +++ b/gdb/testsuite/gdb.base/corefile.exp @@ -105,10 +105,7 @@ if { $found == 0 } { # To do this, we must shutdown the currently running gdb and restart # with the -core args. We can't use gdb_start because it looks for # the first gdb prompt, and the message we are looking for occurs -# before the first prompt. Also, we can't include GDBFLAGS because -# if it is empty, this confuses gdb with an empty argument that it -# grumbles about (said grumbling currently being ignored in gdb_start). -# **FIXME** +# before the first prompt. # # Another problem is that on some systems (solaris for example), there # is apparently a limit on the length of a fully specified path to @@ -117,13 +114,13 @@ if { $found == 0 } { gdb_exit if $verbose>1 then { - send_user "Spawning $GDB -nw $GDBFLAGS -core=$objdir/$subdir/corefile\n" + send_user "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS -core=$objdir/$subdir/corefile\n" } set oldtimeout $timeout set timeout [expr "$timeout + 60"] verbose "Timeout is now $timeout seconds" 2 -eval "spawn $GDB -nw $GDBFLAGS -core=$objdir/$subdir/corefile" +eval "spawn $GDB $INTERNAL_GDBFLAGS $GDBFLAGS -core=$objdir/$subdir/corefile" expect { -re "Couldn't find .* registers in core file.*$gdb_prompt $" { fail "args: -core=corefile (couldn't find regs)" @@ -150,11 +147,11 @@ expect { close; if $verbose>1 then { - send_user "Spawning $GDB -nw $GDBFLAGS $binfile -core=$objdir/$subdir/corefile\n" + send_user "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS $binfile -core=$objdir/$subdir/corefile\n" } -eval "spawn $GDB -nw $GDBFLAGS $binfile -core=$objdir/$subdir/corefile"; +eval "spawn $GDB $INTERNAL_GDBFLAGS $GDBFLAGS $binfile -core=$objdir/$subdir/corefile"; expect { -re "Core was generated by .*coremaker.*\r\n\#0 .*\(\).*\r\n$gdb_prompt $" { pass "args: execfile -core=corefile" diff --git a/gdb/testsuite/gdb.base/dbx.exp b/gdb/testsuite/gdb.base/dbx.exp index f9b32d4..63f92c2 100644 --- a/gdb/testsuite/gdb.base/dbx.exp +++ b/gdb/testsuite/gdb.base/dbx.exp @@ -48,11 +48,11 @@ if { [gdb_compile "${binfile1}.o ${binfile2}.o" ${binfile} executable {debug}] proc dbx_gdb_start { } { global verbose global GDB - global GDBFLAGS + global INTERNAL_GDBFLAGS GDBFLAGS global prompt global spawn_id global timeout - verbose "Spawning $GDB -nw $GDBFLAGS" + verbose "Spawning $GDB -dbx $INTERNAL_GDBFLAGS $GDBFLAGS" if { [which $GDB] == 0 } then { perror "$GDB does not exist." @@ -61,7 +61,7 @@ proc dbx_gdb_start { } { set oldtimeout $timeout set timeout [expr "$timeout + 60"] - eval "spawn $GDB -nw -dbx $GDBFLAGS" + eval "spawn $GDB -dbx $INTERNAL_GDBFLAGS $GDBFLAGS" gdb_expect { -re ".*\r\n$gdb_prompt $" { verbose "GDB initialized." diff --git a/gdb/testsuite/gdb.base/remotetimeout.exp b/gdb/testsuite/gdb.base/remotetimeout.exp index e6661b4..c7056ce 100644 --- a/gdb/testsuite/gdb.base/remotetimeout.exp +++ b/gdb/testsuite/gdb.base/remotetimeout.exp @@ -34,7 +34,7 @@ if [target_info exists noargs] { # Test that -l is processed correctly. # set old_gdbflags $GDBFLAGS -set GDBFLAGS "-l 42" +set GDBFLAGS "$GDBFLAGS -l 42" gdb_exit gdb_start gdb_test "show remotetimeout" \ |