[PATCH/RFA] Use runto_main and continue instead of run

Orjan Friberg orjan.friberg@axis.com
Fri Oct 1 11:50:00 GMT 2004


The "run" command doesn't work well with remote targets.  Tested on 
i686-pc-linux-gnu with no regressions.  Ok to commit?


2004-10-01  Orjan Friberg  <orjanf@axis.com>

	* gdb.threads/bp_in_thread.exp: Use runto_main and "continue" instead
	of "run", since the latter doesn't work with remote targets. Adjust the
	breakpoint numbering accordingly.
	* gdb.threads/pthread_cond_wait.exp: Ditto.


Index: bp_in_thread.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/bp_in_thread.exp,v
retrieving revision 1.1
diff -u -r1.1 bp_in_thread.exp
--- bp_in_thread.exp    27 Aug 2004 14:28:13 -0000      1.1
+++ bp_in_thread.exp    1 Oct 2004 11:30:28 -0000
@@ -35,15 +35,16 @@
  gdb_start
  gdb_reinitialize_dir $srcdir/$subdir
  gdb_load ${binfile}
+runto_main

  gdb_test "break noreturn" \
-         "Breakpoint 1 at .*: file .*${srcfile}, line .*" \
+         "Breakpoint 2 at .*: file .*${srcfile}, line .*" \
           "breakpoint on noreturn"

  # Run the program and make sure GDB reports that we stopped after
  # hitting breakpoint 1 in noreturn().

-gdb_test "run" \
-         ".*Breakpoint 1, noreturn ().*" \
+gdb_test "continue" \
+         ".*Breakpoint 2, noreturn ().*" \
           "run to noreturn"

Index: pthread_cond_wait.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.threads/pthread_cond_wait.exp,v
retrieving revision 1.1
diff -u -r1.1 pthread_cond_wait.exp
--- pthread_cond_wait.exp       19 May 2004 21:41:03 -0000      1.1
+++ pthread_cond_wait.exp       1 Oct 2004 11:30:28 -0000
@@ -36,13 +36,14 @@
  gdb_start
  gdb_reinitialize_dir $srcdir/$subdir
  gdb_load ${binfile}
+runto_main

  gdb_test "break break_me" \
-    "Breakpoint 1 at .*: file .*${srcfile}, line .*" \
+    "Breakpoint 2 at .*: file .*${srcfile}, line .*" \
           "breakpoint on break_me"

-gdb_test "run" \
-         ".*Breakpoint 1, break_me ().*" \
+gdb_test "continue" \
+         ".*Breakpoint 2, break_me ().*" \
           "run to break_me"

  #

-- 
Orjan Friberg
Axis Communications



More information about the Gdb-patches mailing list