aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorBob Rossi <bob@brasko.net>2005-08-02 14:21:01 +0000
committerBob Rossi <bob@brasko.net>2005-08-02 14:21:01 +0000
commitf1ea48cbd9dfb5df1183e6ced6875272eec8e4bb (patch)
treeae37214799cfed0fc50c77d4a03b26bb2321cee3 /gdb/testsuite
parent8e3de13a7def5bf8e931e34500f97bdeee6b111b (diff)
downloadgdb-f1ea48cbd9dfb5df1183e6ced6875272eec8e4bb.zip
gdb-f1ea48cbd9dfb5df1183e6ced6875272eec8e4bb.tar.gz
gdb-f1ea48cbd9dfb5df1183e6ced6875272eec8e4bb.tar.bz2
2005-08-02 Bob Rossi <bob@brasko.net>
* gdb.mi/mi-syn-frame.exp, gdb.mi/mi2-syn-frame.exp: Add MESSAGE parameter to mi_gdb_test. * lib/mi-support.exp (mi_gdb_test): Make MESSAGE parameter necessary.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.mi/mi-syn-frame.exp24
-rw-r--r--gdb/testsuite/gdb.mi/mi2-syn-frame.exp24
-rw-r--r--gdb/testsuite/lib/mi-support.exp13
4 files changed, 46 insertions, 21 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index ef3980c..a787032 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2005-08-02 Bob Rossi <bob@brasko.net>
+
+ * gdb.mi/mi-syn-frame.exp, gdb.mi/mi2-syn-frame.exp: Add MESSAGE
+ parameter to mi_gdb_test.
+ * lib/mi-support.exp (mi_gdb_test): Make MESSAGE parameter necessary.
+
2005-07-31 Daniel Jacobowitz <dan@codesourcery.com>
* gdb.mi/mi-var-child.c (do_children_tests): Initialize
diff --git a/gdb/testsuite/gdb.mi/mi-syn-frame.exp b/gdb/testsuite/gdb.mi/mi-syn-frame.exp
index 011cb45..a5e9965 100644
--- a/gdb/testsuite/gdb.mi/mi-syn-frame.exp
+++ b/gdb/testsuite/gdb.mi/mi-syn-frame.exp
@@ -44,7 +44,9 @@ mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
mi_run_to_main
-mi_gdb_test "400-break-insert foo" "400\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}"
+mi_gdb_test "400-break-insert foo" \
+ "400\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}" \
+ "insert breakpoint foo"
#
@@ -69,21 +71,29 @@ gdb_expect {
}
}
-mi_gdb_test "404-stack-list-frames 0 0" "404\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]"
+mi_gdb_test "404-stack-list-frames 0 0" \
+ "404\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" \
+ "list stack frames"
#
# Call have_a_very_merry_interrupt() which will eventually raise a signal
# that's caught by handler() which calls subroutine().
-mi_gdb_test "405-break-insert subroutine" "405\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}"
+mi_gdb_test "405-break-insert subroutine" \
+ "405\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}" \
+ "insert breakpoint subroutine"
-mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" "Waiting to get a signal\[\r\n\]+\\&\"The program being debugged stopped while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"When the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\n\"\[\r\n\]+\\&\"stop \\(instead of continuing to evaluate the expression containing\\\\n\"\[\r\n\]+\\&\"the function call\\).\\\\n\"\[\r\n\]+406\\^error,msg=\"The program being debugged stopped while in a function called from GDB.\\\\nWhen the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\nstop \\(instead of continuing to evaluate the expression containing\\\\nthe function call\\).\""
+mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" \
+ "Waiting to get a signal\[\r\n\]+\\&\"The program being debugged stopped while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"When the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\n\"\[\r\n\]+\\&\"stop \\(instead of continuing to evaluate the expression containing\\\\n\"\[\r\n\]+\\&\"the function call\\).\\\\n\"\[\r\n\]+406\\^error,msg=\"The program being debugged stopped while in a function called from GDB.\\\\nWhen the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\nstop \\(instead of continuing to evaluate the expression containing\\\\nthe function call\\).\"" \
+ "evaluate expression have_a_very_merry_interrupt"
# We should have both a signal handler and a call dummy frame
# in this next output.
-mi_gdb_test "407-stack-list-frames" "407\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"handler\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"<signal handler called>\"\},.*frame=\{level=\"$decimal\",addr=\"$hex\",func=\"have_a_very_merry_interrupt\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]"
+mi_gdb_test "407-stack-list-frames" \
+ "407\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"handler\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"<signal handler called>\"\},.*frame=\{level=\"$decimal\",addr=\"$hex\",func=\"have_a_very_merry_interrupt\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" \
+ "list stack frames"
send_gdb "408-exec-continue\n"
@@ -96,7 +106,9 @@ gdb_expect {
}
}
-mi_gdb_test "409-stack-list-frames 0 0" "409\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]"
+mi_gdb_test "409-stack-list-frames 0 0" \
+ "409\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" \
+ "list stack frames"
#
# Call bar() by hand, which should get an exception while running.
diff --git a/gdb/testsuite/gdb.mi/mi2-syn-frame.exp b/gdb/testsuite/gdb.mi/mi2-syn-frame.exp
index d0c7313..eb1cbe0 100644
--- a/gdb/testsuite/gdb.mi/mi2-syn-frame.exp
+++ b/gdb/testsuite/gdb.mi/mi2-syn-frame.exp
@@ -45,7 +45,9 @@ mi_gdb_reinitialize_dir $srcdir/$subdir
mi_gdb_load ${binfile}
mi_run_to_main
-mi_gdb_test "400-break-insert foo" "400\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}"
+mi_gdb_test "400-break-insert foo" \
+ "400\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}" \
+ "insert breakpoint foo"
#
@@ -70,21 +72,29 @@ gdb_expect {
}
}
-mi_gdb_test "404-stack-list-frames 0 0" "404\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]"
+mi_gdb_test "404-stack-list-frames 0 0" \
+ "404\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" \
+ "list stack frames"
#
# Call have_a_very_merry_interrupt() which will eventually raise a signal
# that's caught by handler() which calls subroutine().
-mi_gdb_test "405-break-insert subroutine" "405\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}"
+mi_gdb_test "405-break-insert subroutine" \
+ "405\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}" \
+ "insert breakpoint subroutine"
-mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" "Waiting to get a signal\[\r\n\]+\\&\"The program being debugged stopped while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"When the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\n\"\[\r\n\]+\\&\"stop \\(instead of continuing to evaluate the expression containing\\\\n\"\[\r\n\]+\\&\"the function call\\).\\\\n\"\[\r\n\]+406\\^error,msg=\"The program being debugged stopped while in a function called from GDB.\\\\nWhen the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\nstop \\(instead of continuing to evaluate the expression containing\\\\nthe function call\\).\""
+mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" \
+ "Waiting to get a signal\[\r\n\]+\\&\"The program being debugged stopped while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"When the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\n\"\[\r\n\]+\\&\"stop \\(instead of continuing to evaluate the expression containing\\\\n\"\[\r\n\]+\\&\"the function call\\).\\\\n\"\[\r\n\]+406\\^error,msg=\"The program being debugged stopped while in a function called from GDB.\\\\nWhen the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\nstop \\(instead of continuing to evaluate the expression containing\\\\nthe function call\\).\"" \
+ "evaluate expression have_a_very_merry_interrupt"
# We should have both a signal handler and a call dummy frame
# in this next output.
-mi_gdb_test "407-stack-list-frames" "407\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"handler\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"<signal handler called>\"\},.*frame=\{level=\"$decimal\",addr=\"$hex\",func=\"have_a_very_merry_interrupt\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\}.*\\\]"
+mi_gdb_test "407-stack-list-frames" \
+ "407\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"handler\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"<signal handler called>\"\},.*frame=\{level=\"$decimal\",addr=\"$hex\",func=\"have_a_very_merry_interrupt\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\}.*\\\]" \
+ "list stack frames"
send_gdb "408-exec-continue\n"
@@ -97,7 +107,9 @@ gdb_expect {
}
}
-mi_gdb_test "409-stack-list-frames 0 0" "409\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]"
+mi_gdb_test "409-stack-list-frames 0 0" \
+ "409\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" \
+ "list stack frames"
#
# Call bar() by hand, which should get an exception while running.
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index c03c3cc..da4fd34 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -517,10 +517,9 @@ proc mi_gdb_load { arg } {
# this is the null string no command is sent.
# PATTERN is the pattern to match for a PASS, and must NOT include
# the \r\n sequence immediately before the gdb prompt.
-# MESSAGE is an optional message to be printed. If this is
-# omitted, then the pass/fail messages use the command string as the
-# message. (If this is the empty string, then sometimes we don't
-# call pass or fail at all; I don't understand this at all.)
+# MESSAGE is the message to be printed. (If this is the empty string,
+# then sometimes we don't call pass or fail at all; I don't
+# understand this at all.)
#
# Returns:
# 1 if the test failed,
@@ -533,13 +532,9 @@ proc mi_gdb_test { args } {
global GDB expect_out
upvar timeout timeout
- if [llength $args]>2 then {
- set message [lindex $args 2]
- } else {
- set message [lindex $args 0]
- }
set command [lindex $args 0]
set pattern [lindex $args 1]
+ set message [lindex $args 2]
if [llength $args]==5 {
set question_string [lindex $args 3];