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]

[RFC] lib/mi-support.exp: kill SID inferior prior to reconnecting


Below is another SID related patch.   This patch was motivated by
gdb.mi/mi-var-cp.exp which uses the inline test support in
lib/mi-support.exp.   The first inline test runs okay, but subsequent
tests run into trouble when attempting to reconnect to SID using the
same port as the existing connection.  This patch simply kills (or
attempts to kill) the inferior first to avoid that problem.

Comments?

	* lib/mi-support.exp (mi_gdb_target_load): Do a "kill" prior
	to restarting SID.

Index: testsuite/lib/mi-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v
retrieving revision 1.47
diff -u -p -r1.47 mi-support.exp
--- testsuite/lib/mi-support.exp	23 May 2007 12:41:14 -0000	1.47
+++ testsuite/lib/mi-support.exp	19 Jul 2007 00:52:03 -0000
@@ -464,6 +464,10 @@ proc mi_gdb_target_load { } {
 	}
     } elseif { [info procs send_target_sid] != "" } {
 	# For SID, things get complex
+	send_gdb "kill\n"
+	gdb_expect 10 {
+	    -re ".*$mi_gdb_prompt$"
+	}
 	send_target_sid
 	gdb_expect 60 {
 	    -re "\\^done.*$mi_gdb_prompt$" {


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