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]

[PATCH] preventing resuming of threads in gdbserver


Hi,

gdb lets other threads continue execution during single stepping when doing a 
single step in remote mode. This behavior causes thread switches during step 
or next commands. Native mode behavior is opposite of it. Attached patch 
changes it and makes it similar to native mode.

-Amit
Index: gdb-cvs/gdb/remote.c
===================================================================
--- gdb-cvs.orig/gdb/remote.c	2006-01-03 11:24:35.000000000 +0530
+++ gdb-cvs/gdb/remote.c	2006-01-10 18:00:05.000000000 +0530
@@ -2519,10 +2519,10 @@
     {
       /* Resume all threads, with preference for INFERIOR_PTID.  */
       if (step && siggnal != TARGET_SIGNAL_0)
-	outbuf = xstrprintf ("vCont;S%02x:%x;c", siggnal,
+	outbuf = xstrprintf ("vCont;S%02x:%x", siggnal,
 			     PIDGET (inferior_ptid));
       else if (step)
-	outbuf = xstrprintf ("vCont;s:%x;c", PIDGET (inferior_ptid));
+	outbuf = xstrprintf ("vCont;s:%x", PIDGET (inferior_ptid));
       else if (siggnal != TARGET_SIGNAL_0)
 	outbuf = xstrprintf ("vCont;C%02x:%x;c", siggnal,
 			     PIDGET (inferior_ptid));

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