Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfa/mi testsuite] Handle missing inferior I/O for mi-syn-frame.exp
@ 2004-02-28 18:28 Daniel Jacobowitz
  2004-03-19  0:09 ` Daniel Jacobowitz
  2004-04-02 22:02 ` Andrew Cagney
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2004-02-28 18:28 UTC (permalink / raw)
  To: gdb-patches

The output patterns for this test include things printed by the inferior
program.  Obviously, for gdbserver, this output comes out in the wrong
place.  This patch allows it to be missing for noinferiorio; I don't think
this compromises the value of the test.  OK?

BTW, we have one test that "verifies" (kfail'd) that output is properly
MI-encapsulated, and this test unintentionally "verifies" that it isn't.
Should I just remove recognizing the inferior's printouts unconditionally,
instead?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2004-02-28  Daniel Jacobowitz  <drow@mvista.com>

	* gdb.mi/mi-syn-frame.exp: Handle gdb,noinferior.
	* gdb.mi/mi2-syn-frame.exp: Likewise.

Index: gdb/testsuite/gdb.mi/mi-syn-frame.exp
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gdb/testsuite/gdb.mi/mi-syn-frame.exp,v
retrieving revision 1.2
diff -u -p -r1.2 mi-syn-frame.exp
--- gdb/testsuite/gdb.mi/mi-syn-frame.exp	24 Feb 2003 20:15:47 -0000	1.2
+++ gdb/testsuite/gdb.mi/mi-syn-frame.exp	28 Feb 2004 15:35:09 -0000
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2004 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
@@ -64,6 +64,16 @@ gdb_expect {
   -re "403\\^running\[\r\n\]+${my_mi_gdb_prompt}hi in foo\[\r\n\]+403\\\*stopped\[\r\n\]+${my_mi_gdb_prompt}$" {
     pass "403-exec-continue"
   }
+  -re "403\\^running\[\r\n\]+${my_mi_gdb_prompt}403\\\*stopped\[\r\n\]+${my_mi_gdb_prompt}$" {
+    if {[board_info target gdb,noinferiorio]} {
+	pass "403-exec-continue (no inferior output)"
+    } else {
+	fail "403-exec-continue (no inferior output)"
+    }
+  }
+  -re "${my_mi_gdb_prompt}.*${my_mi_gdb_prompt}$" {
+    fail "403-exec-continue (unknown output)"
+  }
   timeout {
     fail "403-exec-continue"
   }
@@ -78,7 +88,11 @@ mi_gdb_test "404-stack-list-frames 0 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\"\}"
 
-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\\).\""
+if {[board_info target gdb,noinferiorio]} {
+    mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" "\\&\"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\\).\""
+} else {
+    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\\).\""
+}
 
 # We should have both a signal handler and a call dummy frame
 # in this next output.
@@ -102,7 +116,11 @@ mi_gdb_test "409-stack-list-frames 0 0" 
 # Call bar() by hand, which should get an exception while running.
 # 
 
-mi_gdb_test "410-data-evaluate-expression bar()" "hi in bar\[\r\n\]+\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
+if {[board_info target gdb,noinferiorio]} {
+    mi_gdb_test "410-data-evaluate-expression bar()" "\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
+} else {
+    mi_gdb_test "410-data-evaluate-expression bar()" "hi in bar\[\r\n\]+\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
+}
 
 mi_gdb_test "411-stack-list-frames" "411\\^done,reason=\"signal-received\",signal-name=\".*\",signal-meaning=\".*\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"bar\",args=\\\[\\\],file=\".*mi-syn-frame.c\",line=\"$decimal\"\},stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"bar\",file=\".*mi-syn-frame.c\",line=\"$decimal\"},frame=\{level=\"1\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",line=\"$decimal\"}.*\\\]" "backtrace from inferior function at exception"
 
Index: gdb/testsuite/gdb.mi/mi2-syn-frame.exp
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gdb/testsuite/gdb.mi/mi2-syn-frame.exp,v
retrieving revision 1.1
diff -u -p -r1.1 mi2-syn-frame.exp
--- gdb/testsuite/gdb.mi/mi2-syn-frame.exp	7 Aug 2003 17:47:42 -0000	1.1
+++ gdb/testsuite/gdb.mi/mi2-syn-frame.exp	28 Feb 2004 15:35:05 -0000
@@ -1,4 +1,4 @@
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2004 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
@@ -64,6 +64,16 @@ gdb_expect {
   -re "403\\^running\[\r\n\]+${my_mi_gdb_prompt}hi in foo\[\r\n\]+403\\\*stopped\[\r\n\]+${my_mi_gdb_prompt}$" {
     pass "403-exec-continue"
   }
+  -re "403\\^running\[\r\n\]+${my_mi_gdb_prompt}403\\\*stopped\[\r\n\]+${my_mi_gdb_prompt}$" {
+    if {[board_info target gdb,noinferiorio]} {
+	pass "403-exec-continue (no inferior output)"
+    } else {
+	fail "403-exec-continue (no inferior output)"
+    }
+  }
+  -re "${my_mi_gdb_prompt}.*${my_mi_gdb_prompt}$" {
+    fail "403-exec-continue (unknown output)"
+  }
   timeout {
     fail "403-exec-continue"
   }
@@ -78,7 +88,11 @@ mi_gdb_test "404-stack-list-frames 0 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\"\}"
 
-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\\).\""
+if {[board_info target gdb,noinferiorio]} {
+    mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" "\\&\"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\\).\""
+} else {
+    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\\).\""
+}
 
 # We should have both a signal handler and a call dummy frame
 # in this next output.
@@ -102,7 +116,11 @@ mi_gdb_test "409-stack-list-frames 0 0" 
 # Call bar() by hand, which should get an exception while running.
 # 
 
-mi_gdb_test "410-data-evaluate-expression bar()" "hi in bar\[\r\n\]+\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
+if {[board_info target gdb,noinferiorio]} {
+    mi_gdb_test "410-data-evaluate-expression bar()" "\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
+} else {
+    mi_gdb_test "410-data-evaluate-expression bar()" "hi in bar\[\r\n\]+\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
+}
 
 mi_gdb_test "411-stack-list-frames" "411\\^done,reason=\"signal-received\",signal-name=\".*\",signal-meaning=\".*\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"bar\",args=\\\[\\\],file=\".*mi-syn-frame.c\",line=\"$decimal\"\},stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"bar\",file=\".*mi-syn-frame.c\",line=\"$decimal\"},frame=\{level=\"1\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",line=\"$decimal\"}.*\\\]" "backtrace from inferior function at exception"
 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [rfa/mi testsuite] Handle missing inferior I/O for mi-syn-frame.exp
  2004-03-19  0:09 ` Daniel Jacobowitz
@ 2004-03-01 18:17   ` Daniel Jacobowitz
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2004-03-01 18:17 UTC (permalink / raw)
  To: gdb-patches

On Sat, Feb 28, 2004 at 01:28:15PM -0500, Daniel Jacobowitz wrote:
> The output patterns for this test include things printed by the inferior
> program.  Obviously, for gdbserver, this output comes out in the wrong
> place.  This patch allows it to be missing for noinferiorio; I don't think
> this compromises the value of the test.  OK?
> 
> BTW, we have one test that "verifies" (kfail'd) that output is properly
> MI-encapsulated, and this test unintentionally "verifies" that it isn't.
> Should I just remove recognizing the inferior's printouts unconditionally,
> instead?

There's a thinko in this patch.  [board_info gdb,noinferiorio] should
be [target_info exists gdb,noinferiorio].

> 2004-02-28  Daniel Jacobowitz  <drow@mvista.com>
> 
> 	* gdb.mi/mi-syn-frame.exp: Handle gdb,noinferior.
> 	* gdb.mi/mi2-syn-frame.exp: Likewise.
> 
> Index: gdb/testsuite/gdb.mi/mi-syn-frame.exp
> ===================================================================
> RCS file: /big/fsf/rsync/src-cvs/src/gdb/testsuite/gdb.mi/mi-syn-frame.exp,v
> retrieving revision 1.2
> diff -u -p -r1.2 mi-syn-frame.exp
> --- gdb/testsuite/gdb.mi/mi-syn-frame.exp	24 Feb 2003 20:15:47 -0000	1.2
> +++ gdb/testsuite/gdb.mi/mi-syn-frame.exp	28 Feb 2004 15:35:09 -0000
> @@ -1,4 +1,4 @@
> -# Copyright 2002, 2003 Free Software Foundation, Inc.
> +# Copyright 2002, 2003, 2004 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
> @@ -64,6 +64,16 @@ gdb_expect {
>    -re "403\\^running\[\r\n\]+${my_mi_gdb_prompt}hi in foo\[\r\n\]+403\\\*stopped\[\r\n\]+${my_mi_gdb_prompt}$" {
>      pass "403-exec-continue"
>    }
> +  -re "403\\^running\[\r\n\]+${my_mi_gdb_prompt}403\\\*stopped\[\r\n\]+${my_mi_gdb_prompt}$" {
> +    if {[board_info target gdb,noinferiorio]} {
> +	pass "403-exec-continue (no inferior output)"
> +    } else {
> +	fail "403-exec-continue (no inferior output)"
> +    }
> +  }
> +  -re "${my_mi_gdb_prompt}.*${my_mi_gdb_prompt}$" {
> +    fail "403-exec-continue (unknown output)"
> +  }
>    timeout {
>      fail "403-exec-continue"
>    }
> @@ -78,7 +88,11 @@ mi_gdb_test "404-stack-list-frames 0 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\"\}"
>  
> -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\\).\""
> +if {[board_info target gdb,noinferiorio]} {
> +    mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" "\\&\"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\\).\""
> +} else {
> +    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\\).\""
> +}
>  
>  # We should have both a signal handler and a call dummy frame
>  # in this next output.
> @@ -102,7 +116,11 @@ mi_gdb_test "409-stack-list-frames 0 0" 
>  # Call bar() by hand, which should get an exception while running.
>  # 
>  
> -mi_gdb_test "410-data-evaluate-expression bar()" "hi in bar\[\r\n\]+\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
> +if {[board_info target gdb,noinferiorio]} {
> +    mi_gdb_test "410-data-evaluate-expression bar()" "\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
> +} else {
> +    mi_gdb_test "410-data-evaluate-expression bar()" "hi in bar\[\r\n\]+\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
> +}
>  
>  mi_gdb_test "411-stack-list-frames" "411\\^done,reason=\"signal-received\",signal-name=\".*\",signal-meaning=\".*\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"bar\",args=\\\[\\\],file=\".*mi-syn-frame.c\",line=\"$decimal\"\},stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"bar\",file=\".*mi-syn-frame.c\",line=\"$decimal\"},frame=\{level=\"1\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",line=\"$decimal\"}.*\\\]" "backtrace from inferior function at exception"
>  
> Index: gdb/testsuite/gdb.mi/mi2-syn-frame.exp
> ===================================================================
> RCS file: /big/fsf/rsync/src-cvs/src/gdb/testsuite/gdb.mi/mi2-syn-frame.exp,v
> retrieving revision 1.1
> diff -u -p -r1.1 mi2-syn-frame.exp
> --- gdb/testsuite/gdb.mi/mi2-syn-frame.exp	7 Aug 2003 17:47:42 -0000	1.1
> +++ gdb/testsuite/gdb.mi/mi2-syn-frame.exp	28 Feb 2004 15:35:05 -0000
> @@ -1,4 +1,4 @@
> -# Copyright 2002, 2003 Free Software Foundation, Inc.
> +# Copyright 2002, 2003, 2004 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
> @@ -64,6 +64,16 @@ gdb_expect {
>    -re "403\\^running\[\r\n\]+${my_mi_gdb_prompt}hi in foo\[\r\n\]+403\\\*stopped\[\r\n\]+${my_mi_gdb_prompt}$" {
>      pass "403-exec-continue"
>    }
> +  -re "403\\^running\[\r\n\]+${my_mi_gdb_prompt}403\\\*stopped\[\r\n\]+${my_mi_gdb_prompt}$" {
> +    if {[board_info target gdb,noinferiorio]} {
> +	pass "403-exec-continue (no inferior output)"
> +    } else {
> +	fail "403-exec-continue (no inferior output)"
> +    }
> +  }
> +  -re "${my_mi_gdb_prompt}.*${my_mi_gdb_prompt}$" {
> +    fail "403-exec-continue (unknown output)"
> +  }
>    timeout {
>      fail "403-exec-continue"
>    }
> @@ -78,7 +88,11 @@ mi_gdb_test "404-stack-list-frames 0 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\"\}"
>  
> -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\\).\""
> +if {[board_info target gdb,noinferiorio]} {
> +    mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" "\\&\"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\\).\""
> +} else {
> +    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\\).\""
> +}
>  
>  # We should have both a signal handler and a call dummy frame
>  # in this next output.
> @@ -102,7 +116,11 @@ mi_gdb_test "409-stack-list-frames 0 0" 
>  # Call bar() by hand, which should get an exception while running.
>  # 
>  
> -mi_gdb_test "410-data-evaluate-expression bar()" "hi in bar\[\r\n\]+\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
> +if {[board_info target gdb,noinferiorio]} {
> +    mi_gdb_test "410-data-evaluate-expression bar()" "\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
> +} else {
> +    mi_gdb_test "410-data-evaluate-expression bar()" "hi in bar\[\r\n\]+\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
> +}
>  
>  mi_gdb_test "411-stack-list-frames" "411\\^done,reason=\"signal-received\",signal-name=\".*\",signal-meaning=\".*\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"bar\",args=\\\[\\\],file=\".*mi-syn-frame.c\",line=\"$decimal\"\},stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"bar\",file=\".*mi-syn-frame.c\",line=\"$decimal\"},frame=\{level=\"1\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",line=\"$decimal\"}.*\\\]" "backtrace from inferior function at exception"
>  
> 

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [rfa/mi testsuite] Handle missing inferior I/O for mi-syn-frame.exp
  2004-02-28 18:28 [rfa/mi testsuite] Handle missing inferior I/O for mi-syn-frame.exp Daniel Jacobowitz
@ 2004-03-19  0:09 ` Daniel Jacobowitz
  2004-03-01 18:17   ` Daniel Jacobowitz
  2004-04-02 22:02 ` Andrew Cagney
  1 sibling, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2004-03-19  0:09 UTC (permalink / raw)
  To: gdb-patches

On Sat, Feb 28, 2004 at 01:28:15PM -0500, Daniel Jacobowitz wrote:
> The output patterns for this test include things printed by the inferior
> program.  Obviously, for gdbserver, this output comes out in the wrong
> place.  This patch allows it to be missing for noinferiorio; I don't think
> this compromises the value of the test.  OK?
> 
> BTW, we have one test that "verifies" (kfail'd) that output is properly
> MI-encapsulated, and this test unintentionally "verifies" that it isn't.
> Should I just remove recognizing the inferior's printouts unconditionally,
> instead?

There's a thinko in this patch.  [board_info gdb,noinferiorio] should
be [target_info exists gdb,noinferiorio].

> 2004-02-28  Daniel Jacobowitz  <drow@mvista.com>
> 
> 	* gdb.mi/mi-syn-frame.exp: Handle gdb,noinferior.
> 	* gdb.mi/mi2-syn-frame.exp: Likewise.
> 
> Index: gdb/testsuite/gdb.mi/mi-syn-frame.exp
> ===================================================================
> RCS file: /big/fsf/rsync/src-cvs/src/gdb/testsuite/gdb.mi/mi-syn-frame.exp,v
> retrieving revision 1.2
> diff -u -p -r1.2 mi-syn-frame.exp
> --- gdb/testsuite/gdb.mi/mi-syn-frame.exp	24 Feb 2003 20:15:47 -0000	1.2
> +++ gdb/testsuite/gdb.mi/mi-syn-frame.exp	28 Feb 2004 15:35:09 -0000
> @@ -1,4 +1,4 @@
> -# Copyright 2002, 2003 Free Software Foundation, Inc.
> +# Copyright 2002, 2003, 2004 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
> @@ -64,6 +64,16 @@ gdb_expect {
>    -re "403\\^running\[\r\n\]+${my_mi_gdb_prompt}hi in foo\[\r\n\]+403\\\*stopped\[\r\n\]+${my_mi_gdb_prompt}$" {
>      pass "403-exec-continue"
>    }
> +  -re "403\\^running\[\r\n\]+${my_mi_gdb_prompt}403\\\*stopped\[\r\n\]+${my_mi_gdb_prompt}$" {
> +    if {[board_info target gdb,noinferiorio]} {
> +	pass "403-exec-continue (no inferior output)"
> +    } else {
> +	fail "403-exec-continue (no inferior output)"
> +    }
> +  }
> +  -re "${my_mi_gdb_prompt}.*${my_mi_gdb_prompt}$" {
> +    fail "403-exec-continue (unknown output)"
> +  }
>    timeout {
>      fail "403-exec-continue"
>    }
> @@ -78,7 +88,11 @@ mi_gdb_test "404-stack-list-frames 0 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\"\}"
>  
> -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\\).\""
> +if {[board_info target gdb,noinferiorio]} {
> +    mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" "\\&\"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\\).\""
> +} else {
> +    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\\).\""
> +}
>  
>  # We should have both a signal handler and a call dummy frame
>  # in this next output.
> @@ -102,7 +116,11 @@ mi_gdb_test "409-stack-list-frames 0 0" 
>  # Call bar() by hand, which should get an exception while running.
>  # 
>  
> -mi_gdb_test "410-data-evaluate-expression bar()" "hi in bar\[\r\n\]+\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
> +if {[board_info target gdb,noinferiorio]} {
> +    mi_gdb_test "410-data-evaluate-expression bar()" "\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
> +} else {
> +    mi_gdb_test "410-data-evaluate-expression bar()" "hi in bar\[\r\n\]+\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
> +}
>  
>  mi_gdb_test "411-stack-list-frames" "411\\^done,reason=\"signal-received\",signal-name=\".*\",signal-meaning=\".*\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"bar\",args=\\\[\\\],file=\".*mi-syn-frame.c\",line=\"$decimal\"\},stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"bar\",file=\".*mi-syn-frame.c\",line=\"$decimal\"},frame=\{level=\"1\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",line=\"$decimal\"}.*\\\]" "backtrace from inferior function at exception"
>  
> Index: gdb/testsuite/gdb.mi/mi2-syn-frame.exp
> ===================================================================
> RCS file: /big/fsf/rsync/src-cvs/src/gdb/testsuite/gdb.mi/mi2-syn-frame.exp,v
> retrieving revision 1.1
> diff -u -p -r1.1 mi2-syn-frame.exp
> --- gdb/testsuite/gdb.mi/mi2-syn-frame.exp	7 Aug 2003 17:47:42 -0000	1.1
> +++ gdb/testsuite/gdb.mi/mi2-syn-frame.exp	28 Feb 2004 15:35:05 -0000
> @@ -1,4 +1,4 @@
> -# Copyright 2002, 2003 Free Software Foundation, Inc.
> +# Copyright 2002, 2003, 2004 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
> @@ -64,6 +64,16 @@ gdb_expect {
>    -re "403\\^running\[\r\n\]+${my_mi_gdb_prompt}hi in foo\[\r\n\]+403\\\*stopped\[\r\n\]+${my_mi_gdb_prompt}$" {
>      pass "403-exec-continue"
>    }
> +  -re "403\\^running\[\r\n\]+${my_mi_gdb_prompt}403\\\*stopped\[\r\n\]+${my_mi_gdb_prompt}$" {
> +    if {[board_info target gdb,noinferiorio]} {
> +	pass "403-exec-continue (no inferior output)"
> +    } else {
> +	fail "403-exec-continue (no inferior output)"
> +    }
> +  }
> +  -re "${my_mi_gdb_prompt}.*${my_mi_gdb_prompt}$" {
> +    fail "403-exec-continue (unknown output)"
> +  }
>    timeout {
>      fail "403-exec-continue"
>    }
> @@ -78,7 +88,11 @@ mi_gdb_test "404-stack-list-frames 0 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\"\}"
>  
> -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\\).\""
> +if {[board_info target gdb,noinferiorio]} {
> +    mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" "\\&\"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\\).\""
> +} else {
> +    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\\).\""
> +}
>  
>  # We should have both a signal handler and a call dummy frame
>  # in this next output.
> @@ -102,7 +116,11 @@ mi_gdb_test "409-stack-list-frames 0 0" 
>  # Call bar() by hand, which should get an exception while running.
>  # 
>  
> -mi_gdb_test "410-data-evaluate-expression bar()" "hi in bar\[\r\n\]+\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
> +if {[board_info target gdb,noinferiorio]} {
> +    mi_gdb_test "410-data-evaluate-expression bar()" "\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
> +} else {
> +    mi_gdb_test "410-data-evaluate-expression bar()" "hi in bar\[\r\n\]+\\&\"The program being debugged was signaled while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"GDB remains in the frame where the signal was received.\\\\n\"\[\r\n\]+\\&\"To change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\n\"\[\r\n\]+\\&\"Evaluation of the expression containing the function \\(bar\\) will be abandoned.\\\\n\"\[\r\n\]+410\\^error,msg=\"The program being debugged was signaled while in a function called from GDB.\\\\nGDB remains in the frame where the signal was received.\\\\nTo change this behavior use \\\\\"set unwindonsignal on\\\\\"\\\\nEvaluation of the expression containing the function \\(bar\\) will be abandoned.\"" "call inferior function which raises exception"
> +}
>  
>  mi_gdb_test "411-stack-list-frames" "411\\^done,reason=\"signal-received\",signal-name=\".*\",signal-meaning=\".*\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"bar\",args=\\\[\\\],file=\".*mi-syn-frame.c\",line=\"$decimal\"\},stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"bar\",file=\".*mi-syn-frame.c\",line=\"$decimal\"},frame=\{level=\"1\",addr=\"$hex\",func=\"<function called from gdb>\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",line=\"$decimal\"}.*\\\]" "backtrace from inferior function at exception"
>  
> 

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [rfa/mi testsuite] Handle missing inferior I/O for mi-syn-frame.exp
  2004-02-28 18:28 [rfa/mi testsuite] Handle missing inferior I/O for mi-syn-frame.exp Daniel Jacobowitz
  2004-03-19  0:09 ` Daniel Jacobowitz
@ 2004-04-02 22:02 ` Andrew Cagney
       [not found]   ` <20040508191439.GA20933@nevyn.them.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2004-04-02 22:02 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

> The output patterns for this test include things printed by the inferior
> program.  Obviously, for gdbserver, this output comes out in the wrong
> place.  This patch allows it to be missing for noinferiorio; I don't think
> this compromises the value of the test.  OK?

Given that testing I/O isn't the objective of this test, just removing 
the output looks to be a better option.

> BTW, we have one test that "verifies" (kfail'd) that output is properly
> MI-encapsulated, and this test unintentionally "verifies" that it isn't.
> Should I just remove recognizing the inferior's printouts unconditionally,
> instead?

Can you rephrase this?

Andrew



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [rfa/mi testsuite] Handle missing inferior I/O for mi-syn-frame.exp
       [not found]   ` <20040508191439.GA20933@nevyn.them.org>
@ 2004-05-10 18:00     ` Andrew Cagney
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2004-05-10 18:00 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

Daniel wrote:
>The output patterns for this test include things printed by the inferior
>program.  Obviously, for gdbserver, this output comes out in the wrong
>place.  This patch allows it to be missing for noinferiorio; I don't think
>this compromises the value of the test.  OK?
Andrew wrote:
Given that testing I/O isn't the objective of this test, just removing 
the output looks to be a better option.
Daniel wrote:
+dummy_puts (const char *string)
+{
+  ;
+}
Er, just _remove_ the output.

Done like so.  OK?  Tested, no regressions on i386-pc-linux-gnu, fixes
8 failures using gdbserver to i386-pc-linux-gnu.

>BTW, we have one test that "verifies" (kfail'd) that output is properly
>MI-encapsulated, and this test unintentionally "verifies" that it isn't.
>Should I just remove recognizing the inferior's printouts unconditionally,
>instead?

Can you rephrase this?


Some test verifies that the output from the inferior is MI encapsulated
- I believe it was mi-console.exp, and it's now KFAILed.  If we changed
MI to successfully encapsulate this sort of output, that would fix
mi-console.exp but  break tests like this one.  That's all I meant.
Good, you were agreeing that the output was irrelevant.

Andrew




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-05-10 18:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-28 18:28 [rfa/mi testsuite] Handle missing inferior I/O for mi-syn-frame.exp Daniel Jacobowitz
2004-03-19  0:09 ` Daniel Jacobowitz
2004-03-01 18:17   ` Daniel Jacobowitz
2004-04-02 22:02 ` Andrew Cagney
     [not found]   ` <20040508191439.GA20933@nevyn.them.org>
2004-05-10 18:00     ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox