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/testsuite/config | |
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/testsuite/config')
-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 |
8 files changed, 249 insertions, 5 deletions
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 { } { |