* mi_gdb_test MESSAGE parameter
@ 2005-08-01 18:31 Bob Rossi
2005-08-02 3:06 ` Daniel Jacobowitz
0 siblings, 1 reply; 3+ messages in thread
From: Bob Rossi @ 2005-08-01 18:31 UTC (permalink / raw)
To: gdb-patches
Hi,
Here is a pre-patch to my previous testsuite patch. I think it makes a
lot of sense to make the MESSAGE parameter to mi_gdb_test necessary.
There was only 1 testcase not using the MESSAGE parameter, and it was
using it 1/2 the time.
Thanks,
Bob Rossi
2005-08-1 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.
Index: gdb/testsuite/gdb.mi/mi-syn-frame.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-syn-frame.exp,v
retrieving revision 1.4
diff -u -r1.4 mi-syn-frame.exp
--- gdb/testsuite/gdb.mi/mi-syn-frame.exp 13 Jun 2005 02:41:51 -0000 1.4
+++ gdb/testsuite/gdb.mi/mi-syn-frame.exp 1 Aug 2005 18:24:24 -0000
@@ -44,7 +44,9 @@
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 @@
}
}
-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 "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 "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\\).\"" \
+"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 @@
}
}
-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.
Index: gdb/testsuite/gdb.mi/mi2-syn-frame.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-syn-frame.exp,v
retrieving revision 1.3
diff -u -r1.3 mi2-syn-frame.exp
--- gdb/testsuite/gdb.mi/mi2-syn-frame.exp 13 Jun 2005 02:41:51 -0000 1.3
+++ gdb/testsuite/gdb.mi/mi2-syn-frame.exp 1 Aug 2005 18:24:24 -0000
@@ -45,7 +45,9 @@
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 @@
}
}
-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 "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 "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\\).\"" \
+"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 @@
}
}
-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.
Index: gdb/testsuite/lib/mi-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v
retrieving revision 1.27
diff -u -r1.27 mi-support.exp
--- gdb/testsuite/lib/mi-support.exp 18 May 2005 03:41:59 -0000 1.27
+++ gdb/testsuite/lib/mi-support.exp 1 Aug 2005 18:24:24 -0000
@@ -517,10 +517,9 @@
# 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 @@
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];
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mi_gdb_test MESSAGE parameter
2005-08-01 18:31 mi_gdb_test MESSAGE parameter Bob Rossi
@ 2005-08-02 3:06 ` Daniel Jacobowitz
2005-08-02 14:21 ` Bob Rossi
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Jacobowitz @ 2005-08-02 3:06 UTC (permalink / raw)
To: gdb-patches
On Mon, Aug 01, 2005 at 02:31:45PM -0400, Bob Rossi wrote:
> Hi,
>
> Here is a pre-patch to my previous testsuite patch. I think it makes a
> lot of sense to make the MESSAGE parameter to mi_gdb_test necessary.
> There was only 1 testcase not using the MESSAGE parameter, and it was
> using it 1/2 the time.
I agree. This is basically OK. Please fix two little things for me
and check it in.
> 2005-08-1 Bob Rossi <bob@brasko.net>
2005-08-01
> -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"
Please indend continued lines. I'm not sure what the standard
indentation is in the testsuite but two spaces, four spaces, or a tab
is probably a good bet. I see all three in use.
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mi_gdb_test MESSAGE parameter
2005-08-02 3:06 ` Daniel Jacobowitz
@ 2005-08-02 14:21 ` Bob Rossi
0 siblings, 0 replies; 3+ messages in thread
From: Bob Rossi @ 2005-08-02 14:21 UTC (permalink / raw)
To: gdb-patches
On Mon, Aug 01, 2005 at 11:06:53PM -0400, Daniel Jacobowitz wrote:
> On Mon, Aug 01, 2005 at 02:31:45PM -0400, Bob Rossi wrote:
> > Hi,
> >
> > Here is a pre-patch to my previous testsuite patch. I think it makes a
> > lot of sense to make the MESSAGE parameter to mi_gdb_test necessary.
> > There was only 1 testcase not using the MESSAGE parameter, and it was
> > using it 1/2 the time.
>
> I agree. This is basically OK. Please fix two little things for me
> and check it in.
Committed, Thanks.
Bob Rossi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-08-02 14:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-01 18:31 mi_gdb_test MESSAGE parameter Bob Rossi
2005-08-02 3:06 ` Daniel Jacobowitz
2005-08-02 14:21 ` Bob Rossi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox