This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit/testsuite] Fix race in mi-break.exp


A race condition I noticed ages ago but never got around to fixing.
You can't use mi_gdb_test with -exec-continue, because mi_gdb_test
only expects one "(gdb)".  If it gets two, it may stop after the first
one.

-- 
Daniel Jacobowitz
CodeSourcery

2010-02-16  Daniel Jacobowitz  <dan@codesourcery.com>

	gdb/testsuite/
	* gdb.mi/mi-break.exp (test_breakpoint_commands): Use
	mi_send_resuming_command to send -exec-continue.

diff -urp gdb-merged-orig/gdb/testsuite/gdb.mi/mi-break.exp gdb-merged/gdb/testsuite/gdb.mi/mi-break.exp
--- gdb-merged-orig/gdb/testsuite/gdb.mi/mi-break.exp	2010-02-10 14:53:19.000000000 -0800
+++ gdb-merged/gdb/testsuite/gdb.mi/mi-break.exp	2010-02-15 16:39:27.000000000 -0800
@@ -232,11 +232,10 @@ proc test_breakpoint_commands {} {
         "\\^done" \
         "breakpoint commands: set commands"
 
-    mi_gdb_test "-exec-continue" \
+    mi_send_resuming_command "exec-continue" "test hitting breakpoint with commands"
+    mi_gdb_test "" \
         ".*\\\$1 = 0.*\\\$10 = 9.*\\*running.*\\*stopped,reason=\"exited-normally\".*" \
-        "test hitting breakpoint with commands"    
-
-
+        "test hitting breakpoint with commands"
 }
 
 test_tbreak_creation_and_listing


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]