[patch/gdbserver] Update current inferior when using vCont

Daniel Jacobowitz drow@false.org
Sat Feb 28 18:24:00 GMT 2004


Extensive testing on a software-single-step target using vCont turned up a
problem that testing on x86 didn't - not surprising, since gdbserver is
stressed much harder in this case.  By not calling set_desired_inferior after
setting cont_thread, we could end up sending signals to the wrong thread on
an interrupt from the client.

Will commit in a bit.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

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

	* server.c (handle_v_cont): Call set_desired_inferior.

Index: gdb/gdbserver/server.c
===================================================================
RCS file: /big/fsf/rsync/src-cvs/src/gdb/gdbserver/server.c,v
retrieving revision 1.16
diff -u -p -r1.16 server.c
--- gdb/gdbserver/server.c	13 Oct 2003 16:17:21 -0000	1.16
+++ gdb/gdbserver/server.c	28 Feb 2004 03:06:13 -0000
@@ -213,6 +215,7 @@ handle_v_cont (char *own_buf, char *stat
     cont_thread = resume_info[0].thread;
   else
     cont_thread = -1;
+  set_desired_inferior (0);
 
   (*the_target->resume) (resume_info);
 



More information about the Gdb-patches mailing list