diff options
author | Bob Manson <manson@cygnus> | 1998-03-31 08:42:55 +0000 |
---|---|---|
committer | Bob Manson <manson@cygnus> | 1998-03-31 08:42:55 +0000 |
commit | eead61208dd341f058207fcc99d3781eba3cbe6e (patch) | |
tree | 2320df24a04e56c7275298ae3cb4436f4dbd3c0d /gdb/testsuite | |
parent | b11b841b11f6e2ac3247bd1905cb2dffb60332e6 (diff) | |
download | gdb-eead61208dd341f058207fcc99d3781eba3cbe6e.zip gdb-eead61208dd341f058207fcc99d3781eba3cbe6e.tar.gz gdb-eead61208dd341f058207fcc99d3781eba3cbe6e.tar.bz2 |
* lib/gdb.exp(gdb_test): Send multiline commands one at a time; wait
for a newline from gdb before continuing.
(default_gdb_exit): Just look for y or n.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 18 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 52 |
2 files changed, 61 insertions, 9 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 968c970..548a304 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,21 @@ +Tue Mar 31 00:40:32 1998 Bob Manson <manson@charmed.cygnus.com> + + * lib/gdb.exp(gdb_test): Send multiline commands one at a time; wait + for a newline from gdb before continuing. + (default_gdb_exit): Just look for y or n. + +Tue Mar 24 22:44:52 1998 Bob Manson <manson@charmed.cygnus.com> + + * config/cygmon.exp: New file. + +Mon Mar 16 21:39:11 1998 Bob Manson <manson@charmed.cygnus.com> + + * gdb.base/list.exp: Fix problem with "list default lines around + main" test on remote targets. + + * gdb.base/scope.exp: Fix problem with filelocal_bss before + run test on remote targets. + Thu Mar 12 16:23:00 1998 Doug Evans <devans@canuck.cygnus.com> * gdb.asm: New directory. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 6710ea7..3103f86 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -357,15 +357,41 @@ proc gdb_test { args } { } set result -1 - if ![string match $command ""] { - if { [send_gdb "$command\n"] != "" } { - global suppress_flag; + set string "${command}\n"; + if { $command != "" } { + while { "$string" != "" } { + set foo [string first "\n" "$string"]; + set len [string length "$string"]; + if { $foo < [expr $len - 1] } { + set str [string range "$string" 0 $foo]; + if { [send_gdb "$str"] != "" } { + global suppress_flag; + + if { ! $suppress_flag } { + perror "Couldn't send $command to GDB."; + } + fail "$message"; + return $result; + } + gdb_expect 2 { + -re "\[\r\n\]" { } + timeout { } + } + set string [string range "$string" [expr $foo + 1] end]; + } else { + break; + } + } + if { "$string" != "" } { + if { [send_gdb "$string"] != "" } { + global suppress_flag; - if { ! $suppress_flag } { - perror "Couldn't send $command to GDB."; + if { ! $suppress_flag } { + perror "Couldn't send $command to GDB."; + } + fail "$message"; + return $result; } - fail "$message"; - return $result; } } @@ -623,7 +649,7 @@ proc default_gdb_exit {} { if { [is_remote host] && [board_info host exists fileid] } { send_gdb "quit\n"; gdb_expect 10 { - -re "and kill it.*y or n. " { + -re "y or n" { send_gdb "y\n"; exp_continue; } @@ -632,7 +658,9 @@ proc default_gdb_exit {} { } } - remote_close host; + if ![is_remote host] { + remote_close host; + } unset gdb_spawn_id } @@ -824,6 +852,11 @@ proc gdb_compile {source dest type options} { lappend options "libs=[target_info gdb_stub]"; set options [concat $options2 $options] } + if [target_info exists is_vxworks] { + set options2 { "additional_flags=-Dvxworks" } + lappend options "libs=[target_info gdb_stub]"; + set options [concat $options2 $options] + } if [info exists GDB_TESTCASE_OPTIONS] { lappend options "additional_flags=$GDB_TESTCASE_OPTIONS"; } @@ -926,6 +959,7 @@ proc gdb_suppress_entire_file { reason } { proc gdb_suppress_tests { args } { global suppress_flag; + return; # fnf - disable pending review of results where testsuite ran better without this incr suppress_flag; if { $suppress_flag == 1 } { |