diff options
author | Fred Fish <fnf@specifix.com> | 1996-06-26 04:38:38 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1996-06-26 04:38:38 +0000 |
commit | a26fa899a006b491e6ae07299f55685dfe394943 (patch) | |
tree | 6ef178ab30284931f3626a664b8a786d278f95c2 /gdb | |
parent | 78c09e4af5d59fda57ad5a2bbd4942f7525bda8a (diff) | |
download | gdb-a26fa899a006b491e6ae07299f55685dfe394943.zip gdb-a26fa899a006b491e6ae07299f55685dfe394943.tar.gz gdb-a26fa899a006b491e6ae07299f55685dfe394943.tar.bz2 |
* lib/gdb.exp: Report timeout value for verbosity level 2.
* config/gdbserver.exp: Ditto.
* config/hppro.exp: Ditto.
* config/mips-gdb.exp: Ditto.
* config/monitor.exp: Ditto.
* config/netware.exp: Ditto.
* config/sim-gdb.exp: Ditto.
* config/slite-gdb.exp: Ditto.
* config/udi-gdb.exp: Ditto.
* config/unix-gdb.exp: Ditto.
* config/vx-gdb.exp: Ditto.
* gdb.base/a1-selftest.exp: Ditto.
* gdb.base/a2-run.exp: Ditto.
* gdb.base/break.exp: Ditto.
* gdb.base/corefile.exp: Ditto.
* gdb.base/list.exp: Ditto.
* gdb.base/recurse.exp: Ditto.
* gdb.base/scope.exp: Ditto.
* gdb.base/signals.exp: Ditto.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 22 | ||||
-rw-r--r-- | gdb/testsuite/config/hppro.exp | 1 | ||||
-rw-r--r-- | gdb/testsuite/config/mips-gdb.exp | 8 | ||||
-rw-r--r-- | gdb/testsuite/config/netware.exp | 213 | ||||
-rw-r--r-- | gdb/testsuite/config/sim-gdb.exp | 8 | ||||
-rw-r--r-- | gdb/testsuite/config/slite-gdb.exp | 10 | ||||
-rw-r--r-- | gdb/testsuite/config/udi-gdb.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/config/unix-gdb.exp | 1 | ||||
-rw-r--r-- | gdb/testsuite/config/vx-gdb.exp | 11 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/a1-selftest.exp | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/list.exp | 15 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/signals.exp | 11 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 22 |
13 files changed, 304 insertions, 23 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index be3122a..fbbc787 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,25 @@ +Tue Jun 25 19:59:17 1996 Fred Fish <fnf@cygnus.com> + + * lib/gdb.exp: Report timeout value for verbosity level 2. + * config/gdbserver.exp: Ditto. + * config/hppro.exp: Ditto. + * config/mips-gdb.exp: Ditto. + * config/monitor.exp: Ditto. + * config/netware.exp: Ditto. + * config/sim-gdb.exp: Ditto. + * config/slite-gdb.exp: Ditto. + * config/udi-gdb.exp: Ditto. + * config/unix-gdb.exp: Ditto. + * config/vx-gdb.exp: Ditto. + * gdb.base/a1-selftest.exp: Ditto. + * gdb.base/a2-run.exp: Ditto. + * gdb.base/break.exp: Ditto. + * gdb.base/corefile.exp: Ditto. + * gdb.base/list.exp: Ditto. + * gdb.base/recurse.exp: Ditto. + * gdb.base/scope.exp: Ditto. + * gdb.base/signals.exp: Ditto. + Tue Jun 25 23:16:58 1996 Jason Molenda (crash@godzilla.cygnus.co.jp) * gdb.threads/Makefile.in (docdir): Removed. diff --git a/gdb/testsuite/config/hppro.exp b/gdb/testsuite/config/hppro.exp index d71a398..f015c86 100644 --- a/gdb/testsuite/config/hppro.exp +++ b/gdb/testsuite/config/hppro.exp @@ -2,3 +2,4 @@ load_lib ../config/monitor.exp # Hppro monitor is very slow... set timeout 540 +verbose "Timeout is now $timeout seconds" 2 diff --git a/gdb/testsuite/config/mips-gdb.exp b/gdb/testsuite/config/mips-gdb.exp index 629f02a..2043f72 100644 --- a/gdb/testsuite/config/mips-gdb.exp +++ b/gdb/testsuite/config/mips-gdb.exp @@ -77,6 +77,7 @@ proc gdb_load { arg } { send "target mips $targetname\n" set timeout 60 + verbose "Timeout is now $timeout seconds" 2 expect { -re "Remote MIPS debugging.*$prompt $" { if $verbose>1 then { @@ -86,6 +87,7 @@ proc gdb_load { arg } { timeout { perror "Couldn't set MIPS target." set timeout 10 + verbose "Timeout is now $timeout seconds" 2 return -1 } } @@ -95,12 +97,14 @@ proc gdb_load { arg } { send_user "Loading $arg into $GDB\n" } set timeout 2400 + verbose "Timeout is now $timeout seconds" 2 expect { -re "Loading.*$prompt $" { if $verbose>1 then { send_user "Loaded $arg into $GDB\n" } set timeout 30 + verbose "Timeout is now $timeout seconds" 2 } -re "$prompt $" { if $verbose>1 then { @@ -114,6 +118,7 @@ proc gdb_load { arg } { } } set timeout 10 + verbose "Timeout is now $timeout seconds" 2 if [info exists expect_out(buffer)] then { send_log $expect_out(buffer) } @@ -204,6 +209,7 @@ proc gdb_start { } { # } # send "target mips $targetname\n" # set timeout 60 +# verbose "Timeout is now $timeout seconds" 2 # expect { # -re "Remote MIPS debugging.*$prompt $" { # if $verbose>1 then { @@ -213,10 +219,12 @@ proc gdb_start { } { # timeout { # perror "Couldn't set MIPS target." # set timeout 10 +# verbose "Timeout is now $timeout seconds" 2 # return -1 # } # } set timeout 10 + verbose "Timeout is now $timeout seconds" 2 } expect_after { diff --git a/gdb/testsuite/config/netware.exp b/gdb/testsuite/config/netware.exp new file mode 100644 index 0000000..7dcad4d --- /dev/null +++ b/gdb/testsuite/config/netware.exp @@ -0,0 +1,213 @@ +# Copyright (C) 1988, 1990, 1991, 1992, 1994 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +# Please email any bugs, comments, and/or additions to this file to: +# bug-gdb@prep.ai.mit.edu + +# This file was written by J.T. Conklin. (jtc@cygnus.com) + +load_lib gdb.exp +load_lib remote.exp + +global shell_id +global passwd + +global LD +if ![info exists LD] then { + set LD [findfile "$base_dir/../../ld/ld.new"] +} + +global NLMCONV +if ![info exists NLMCONV] then { + set NLMCONV [findfile "$base_dir/../../binutils/nlmconv"] +} + +# +# gdb_version -- extract and print the version number of gcc +# +proc gdb_version {} { + default_gdb_version +} + +# +# gdb_unload -- unload a file if one is loaded +# + +# +# gdb_load -- load a file into the debugger. +# return a -1 if anything goes wrong. +# +proc gdb_load { arg } { + global prompt + global LD + global NLMCONV + global errorCode + global targetname + global shell_id + + set obj [file tail $arg] + set nlm "$obj.nlm" + set lnk "$obj.lnk" + + # build *.lnk file + set fd [open $lnk w] + puts $fd "description \"[file tail $nlm]\"" + puts $fd "screenname \"System Console\"" + puts $fd "module clib.nlm" + puts $fd "module mathlib.nlm" + puts $fd "stack 32768" +# puts $fd "stack 64512" + puts $fd "debug" + # FIXME: don't hardcode location of prelude.o + puts $fd "input /s1/cygnus/dejagnu/i386-netware/lib/prelude.o" + puts $fd "input $arg" + puts $fd "output $nlm" + close $fd + + # run nlmconv + verbose "Executing: $NLMCONV -l$LD -T$lnk" 1 + catch "exec $NLMCONV -l$LD -T$lnk" output + if ![string match "" $output] then { + verbose $output 1 + } + if ![string match "NONE" $errorCode] { + warning "Can't link $arg" + + return -1 + } + catch "exec rm -f $lnk" + + # download + verbose "Downloading $nlm" 1 + catch "exec cp $nlm /.NetWare/$targetname.nws/sys.nwv/tmp/x.nlm" output + if ![string match "" $output] then { + verbose $output 1 + return -1 + } + + gdb_file_cmd $nlm +} + +proc gdb_start { } { + default_gdb_start +} + +proc gdb_exit { } { + catch default_gdb_exit +} + +proc gdb_run_cmd { } { + global shell_id + global prompt + global baud serialport + global targetname + global timeout + + send "kill\n" + expect { + -re ".*Kill the program being debugged.*y or n. $" { + send "y\n" + exp_continue + } + -re ".*$prompt $" {} + } + + verbose "Starting GDB stub on $targetname" 1 + send -i $shell_id "load nlmstub BAUD=$baud x.nlm\r\n" + + send "set remotebaud $baud\n" + expect { + -re "$prompt" {} + timeout { + perror "Couldn't set remote baud rate" + return + } + } + + set otimeout $timeout + set timeout 60 + verbose "Timeout is now $timeout seconds" 2 + send "target remote $serialport\n" + expect { + -re "Couldn't establish connection to remote target" { + send "target remote $serialport\n" + exp_continue + } + -re "$prompt" {} + timeout { + perror "Couldn't set remote target" + return + } + } + set timeout $otimeout + verbose "Timeout is now $timeout seconds" 2 + + send "continue\n" + expect { + "Continuing.$" {} + } + + return +} + + + +# +# start the remote shell +# + +set shell_prompt "Password:" +set shell_id [ eval $connectmode "$targetname" ] + +if $shell_id<0 then { + warning "Couldn't connect to target" + return -1 +} + +if [string match "" $passwd] then { + stty -echo + send_user "Password: " + expect_user -re "(.*)\n" + send_user "\n" + set passwd "$expect_out(1,string)" + stty echo +} + +send -i $shell_id "$passwd\n" +expect { + -i $shell_id ":" { + verbose "Got termtype prompt" 0 + } + + -i $shell_id timeout { + warning "Connection timed out" + return -1 + } +} + + +set shell_prompt "[string toupper $targetname]:" +send -i $shell_id "1\n" + +expect { + -i $shell_id -re "$shell_prompt" {} + -i $shell_id timeout { + warning "Connection timed out" + return -1 + } +} + +gdb_start diff --git a/gdb/testsuite/config/sim-gdb.exp b/gdb/testsuite/config/sim-gdb.exp index 821e82f..a6e2daf 100644 --- a/gdb/testsuite/config/sim-gdb.exp +++ b/gdb/testsuite/config/sim-gdb.exp @@ -54,6 +54,7 @@ proc gdb_target_sim { } { send "target sim $target_sim_options\n" set timeout 60 + verbose "Timeout is now $timeout seconds" 2 expect { -re "Connected to the simulator.*$prompt $" { verbose "Set target to sim" @@ -65,6 +66,7 @@ proc gdb_target_sim { } { } } set timeout 10 + verbose "Timeout is now $timeout seconds" 2 } # @@ -84,22 +86,24 @@ proc gdb_load { arg } { send "load\n" set timeout 2400 + verbose "Timeout is now $timeout seconds" 2 expect { -re ".*$prompt $" { if $verbose>1 then { send_user "Loaded $arg into $GDB\n" } set timeout 30 + verbose "Timeout is now $timeout seconds" 2 return 1 } -re "$prompt $" { if $verbose>1 then { - perror "GDB couldn't load." + perror "GDB couldn't load." } } timeout { if $verbose>1 then { - perror "Timed out trying to load $arg." + perror "Timed out trying to load $arg." } } } diff --git a/gdb/testsuite/config/slite-gdb.exp b/gdb/testsuite/config/slite-gdb.exp index 30cab59..3d4b265 100644 --- a/gdb/testsuite/config/slite-gdb.exp +++ b/gdb/testsuite/config/slite-gdb.exp @@ -81,6 +81,7 @@ proc gdb_load { arg } { send "target sparclite $targetname\n" set timeout 60 + verbose "Timeout is now $timeout seconds" 2 expect { -re ".*SPARClite appears to be alive.*$prompt $" { if $verbose>1 then { @@ -90,6 +91,7 @@ proc gdb_load { arg } { timeout { perror "Couldn't set SLITE target." set timeout 10 + verbose "Timeout is now $timeout seconds" 2 return -1 } } @@ -99,12 +101,14 @@ proc gdb_load { arg } { send_user "Loading $arg into $GDB\n" } set timeout 2400 + verbose "Timeout is now $timeout seconds" 2 expect { -re "Loading.*$prompt $" { if $verbose>1 then { send_user "Loaded $arg into $GDB\n" } set timeout 30 + verbose "Timeout is now $timeout seconds" 2 } -re "$prompt $" { if $verbose>1 then { @@ -118,9 +122,11 @@ proc gdb_load { arg } { } } set timeout 10 + verbose "Timeout is now $timeout seconds" 2 send "target remote $targetname\n" set timeout 60 + verbose "Timeout is now $timeout seconds" 2 expect { -re ".*$prompt $" { if $verbose>1 then { @@ -130,6 +136,7 @@ proc gdb_load { arg } { timeout { perror "Couldn't set remote target." set timeout 10 + verbose "Timeout is now $timeout seconds" 2 return -1 } } @@ -224,6 +231,7 @@ proc gdb_start { } { # } # send "target mips $targetname\n" # set timeout 60 +# verbose "Timeout is now $timeout seconds" 2 # expect { # -re "Remote MIPS debugging.*$prompt $" { # if $verbose>1 then { @@ -233,10 +241,12 @@ proc gdb_start { } { # timeout { # perror "Couldn't set MIPS target." # set timeout 10 +# verbose "Timeout is now $timeout seconds" 2 # return -1 # } # } set timeout 10 + verbose "Timeout is now $timeout seconds" 2 } expect_after { diff --git a/gdb/testsuite/config/udi-gdb.exp b/gdb/testsuite/config/udi-gdb.exp index f378d30..9a369fd 100644 --- a/gdb/testsuite/config/udi-gdb.exp +++ b/gdb/testsuite/config/udi-gdb.exp @@ -47,6 +47,7 @@ proc gdb_target_udi { } { # set targets hostname send "target udi $targetname\n" set timeout 60 + verbose "Timeout is now $timeout seconds" 2 expect { -re "target udi $targetname\[\r\n\]+" { exp_continue @@ -71,6 +72,7 @@ proc gdb_target_udi { } { } } set timeout 10 + verbose "Timeout is now $timeout seconds" 2 } # diff --git a/gdb/testsuite/config/unix-gdb.exp b/gdb/testsuite/config/unix-gdb.exp index 01441d5..9961ec6 100644 --- a/gdb/testsuite/config/unix-gdb.exp +++ b/gdb/testsuite/config/unix-gdb.exp @@ -24,6 +24,7 @@ # When running the tests over NFS, under somewhat heavy load, 10 seconds # does not seem to be enough. Try starting with 30. set timeout 30 +verbose "Timeout is now $timeout seconds" 2 load_lib gdb.exp diff --git a/gdb/testsuite/config/vx-gdb.exp b/gdb/testsuite/config/vx-gdb.exp index 43ffb3c..984f4be 100644 --- a/gdb/testsuite/config/vx-gdb.exp +++ b/gdb/testsuite/config/vx-gdb.exp @@ -71,7 +71,7 @@ proc gdb_start { } { # get a connection to the board set shell_id [ eval $connectmode "$targetname" ] if $shell_id<0 then { - perror "Couldn't connect to $targetname." + perror "Couldn't connect to $targetname." return -1 } verbose "Spawn id for remote shell is $shell_id" @@ -82,16 +82,17 @@ proc gdb_start { } { send -i $shell_id "\030" set timeout 120 + verbose "Timeout is now $timeout seconds" 2 expect { -i $shell_id -re "Connection closed.*$" { verbose "\nVxWorks has closed the shell" } -i $shell_id eof { - perror "(eof) never disconnected from VxWorks shell." + perror "(eof) never disconnected from VxWorks shell." return -1 } -i $shell_id timeout { - perror "(timeout) never disconnected from VxWorks shell." + perror "(timeout) never disconnected from VxWorks shell." return -1 } } @@ -99,6 +100,7 @@ proc gdb_start { } { wait -i $shell_id } set timeout 10 + verbose "Timeout is now $timeout seconds" 2 catch "spawn_vxgdb" } @@ -119,6 +121,7 @@ proc spawn_vxgdb { } { # set targets hostname send "target vxworks $targetname\n" set timeout 60 + verbose "Timeout is now $timeout seconds" 2 expect { -re "Done\..*$prompt $" { verbose "Set target to $targetname" 1 @@ -130,10 +133,12 @@ proc spawn_vxgdb { } { timeout { perror "Couldn't set target for vxworks." set timeout 10 + verbose "Timeout is now $timeout seconds" 2 return -1 } } set timeout 10 + verbose "Timeout is now $timeout seconds" 2 } proc gdb_exit { } { diff --git a/gdb/testsuite/gdb.base/a1-selftest.exp b/gdb/testsuite/gdb.base/a1-selftest.exp index f8718b0..d9eb859 100644 --- a/gdb/testsuite/gdb.base/a1-selftest.exp +++ b/gdb/testsuite/gdb.base/a1-selftest.exp @@ -44,6 +44,7 @@ proc test_with_self {} { global tool global det_file global decimal + global timeout # load yourself into the debugger # This can take a relatively long time, particularly for testing where @@ -56,6 +57,7 @@ proc test_with_self {} { # of this test, and then back to the original value. set timeout 600 + verbose "Timeout is now $timeout seconds" 2 if {[gdb_load "./x$tool"] <0} then { return -1 } @@ -118,6 +120,7 @@ proc test_with_self {} { # It may take a very long time for the inferior gdb to start (lynx), # so we wait until after it's started to reset the timeout value. set timeout 30 + verbose "Timeout is now $timeout seconds" 2 # do we have a version number ? send "print version\n" diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp index 82d4fc2..1aadd4c 100644 --- a/gdb/testsuite/gdb.base/list.exp +++ b/gdb/testsuite/gdb.base/list.exp @@ -28,24 +28,29 @@ set bug_id 0 set testfile "list" set binfile ${objdir}/${subdir}/${testfile} -if { [compile "${srcdir}/${subdir}/list0.c -g -c -o ${binfile}0.o"] != "" } { +if { [compile "-g -c ${srcdir}/${subdir}/list0.c"] != "" } { perror "Couldn't compile ${testfile}0.c to object" return -1 } -if { [compile "${srcdir}/${subdir}/list1.c -g -c -o ${binfile}1.o"] != "" } { +execute_anywhere "mv list0.o ${binfile}0.o" +if { [compile "-g -c ${srcdir}/${subdir}/list1.c"] != "" } { perror "Couldn't compile ${testfile}1.c to object" return -1 } +execute_anywhere "mv list1.o ${binfile}1.o" if { [compile "${binfile}0.o ${binfile}1.o -o ${binfile}"] != "" } { perror "Couldn't link ${testfile}." return -1 } +# Create and source the file that provides information about the compiler +# used to compile the test case. execute_anywhere "rm -f ${binfile}.ci" if { [compile "-E ${srcdir}/${subdir}/compiler.c > ${binfile}.ci"] != "" } { - perror "Couldn't make ${testfile}.ci file" + perror "Couldn't make ${binfile}.ci file" return -1 } +source ${binfile}.ci # # Local utility proc just to set and verify listsize @@ -545,7 +550,6 @@ proc test_list_function {} { # Ultrix gdb is the second case, still correct. # SunPRO cc is the third case. setup_xfail "powerpc-*-*" - if {$gcc_compiled} then { setup_xfail "rs6000-*-*" } send "list foo\n" expect { -re "2\[ \t\]+including file.*11\[ \t\]+bar \[(\]+.*\[)\]+;\r\n$prompt $" { @@ -894,6 +898,7 @@ proc test_forward_search {} { # being searched is extremely long. set timeout 30 + verbose "Timeout is now $timeout seconds" 2 gdb_test "search 1234" "" } @@ -904,8 +909,6 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} -source ${binfile}.ci - if $usestubs { send "step\n" # if use stubs step out of the breakpoint() function. diff --git a/gdb/testsuite/gdb.base/signals.exp b/gdb/testsuite/gdb.base/signals.exp index 4f9861d..d48fac9 100644 --- a/gdb/testsuite/gdb.base/signals.exp +++ b/gdb/testsuite/gdb.base/signals.exp @@ -18,12 +18,14 @@ if { [compile "${srcdir}/${subdir}/${srcfile} -g -o ${binfile}"] != "" } { return -1 } +# Create and source the file that provides information about the compiler +# used to compile the test case. execute_anywhere "rm -f ${binfile}.ci" if { [compile "-E ${srcdir}/${subdir}/compiler.c > ${binfile}.ci"] != "" } { - perror "Couldn't make ${testfile}.ci file" + perror "Couldn't make ${binfile}.ci file" return -1 } -source gdb.base/${testfile}.ci +source ${binfile}.ci proc signal_tests_1 {} { global prompt @@ -303,8 +305,8 @@ proc test_handle_all_print {} { # Increase timeout and expect input buffer for large output from gdb. # Allow blank or TAB as whitespace characters. set timeout 30 + verbose "Timeout is now $timeout seconds" 2 match_max 8000 - setup_xfail "alpha-dec-osf2*" gdb_test "handle all print" "Signal\[ \]+Stop\[ \]+Print\[ \]+Pass to program\[ \]+Description\r\nSIGHUP\[ \]+Yes\[ \]+Yes\[ \]+Yes\[ \]+Hangup.*SIG63\[ \]+Yes\[ \]+Yes\[ \]+Yes\[ \]+Real-time event 63" } test_handle_all_print @@ -365,9 +367,8 @@ if [runto_main] then { The program being debugged stopped while in a function called from GDB.*" \ "p func1 () #2 in signals.exp" # But we should be able to backtrace... - # On alpha-*-osf2.0 this test works when run manually but fails when + # On alpha-*-osf2.0 this test works when run manually but sometime fails when # run under dejagnu, making it very hard to debug the problem. Weird... - if {$gcc_compiled} then { setup_xfail "alpha-*-osf2*" } gdb_test "bt" "#0.*handler.*#1.*#2.*main.*" "bt in signals.exp" # ...and continue... gdb_test "continue" "Continuing\\." "continue in signals.exp" diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 9eaa40c..67f3fdc 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -35,38 +35,39 @@ global CHILL_RT0 if ![info exists CC] { set CC [findfile $base_dir/../../gcc/xgcc "$base_dir/../../gcc/xgcc -B$base_dir/../../gcc/" [transform gcc]] - verbose "CC defaulting to $CC" 2 } +verbose "using CC = $CC" 2 if ![info exists CXX] { set CXX [findfile $base_dir/../../gcc/xgcc "$base_dir/../../gcc/xgcc -B$base_dir/../../gcc/" [transform g++]] - verbose "CXX defaulting to $CC" 2 } +verbose "using CXX = $CXX" 2 if ![info exists CHILL_LIB] { set CHILL_LIB [findfile $base_dir/../../gcc/ch/runtime/libchill.a "$base_dir/../../gcc/ch/runtime/libchill.a" [transform -lchill]] - verbose "CHILL_LIB defaulting to $CHILL_LIB" 2 } +verbose "using CHILL_LIB = $CHILL_LIB" 2 if ![info exists CHILL_RT0] { set CHILL_RT0 [findfile $base_dir/../../gcc/ch/runtime/chillrt0.o "$base_dir/../../gcc/ch/runtime/chillrt0.o" ""] - verbose "CHILL_RT0 defaulting to $CHILL_RT0" 2 } +verbose "using CHILL_RT0 = $CHILL_RT0" 2 if ![info exists LDFLAGS] { if [is3way] { append LDFLAGS " [libgloss_flags] [newlib_flags]" } set LDFLAGS "" - verbose "LDFLAGS defaulting to $LDFLAGS" 2 } +verbose "using LDFLAGS = $LDFLAGS" 2 if ![info exists GDB] then { set GDB [findfile $base_dir/../../gdb/gdb "$base_dir/../../gdb/gdb" [transform gdb]] } - +verbose "using GDB = $GDB" 2 global GDBFLAGS if ![info exists GDBFLAGS] then { set GDBFLAGS "-nx" } +verbose "using GDBFLAGS = $GDBFLAGS" 2 # The variable prompt is a regexp which matches the gdb prompt. Set it if it # is not already set. @@ -94,6 +95,10 @@ if ![info exists noinferiorio] then { set noinferiorio 0 } +if ![info exists noresults] then { + set noresults 0 +} + # # gdb_version -- extract and print the version number of GDB # @@ -185,7 +190,7 @@ proc gdb_run_cmd {} { send "y\n" expect { -re "Continuing.*$prompt $" {} - timeout { perror "Jump to start() failed"; return } + timeout { perror "Jump to start() failed (timeout)"; return } } } timeout { perror "Jump to start() failed (timeout)"; return } @@ -521,6 +526,7 @@ proc default_gdb_exit {} { # This used to be 1 for unix-gdb.exp set timeout 5 + verbose "Timeout is now $timeout seconds" 2 # We used to try to send "quit" to GDB, and wait for it to die. # Dealing with all the cases and errors got pretty hairy. Just close it, @@ -614,6 +620,7 @@ proc default_gdb_start { } { set oldtimeout $timeout set timeout [expr "$timeout + 60"] + verbose "Timeout is now $timeout seconds" 2 eval "spawn $GDB -nw $GDBFLAGS" expect { -re ".*\r\n$prompt $" { @@ -629,6 +636,7 @@ proc default_gdb_start { } { } } set timeout $oldtimeout + verbose "Timeout is now $timeout seconds" 2 # force the height to "unlimited", so no pagers get used send "set height 0\n" expect { |