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]

[remote] Fix vCont;t when multiprocess extensions are off.


I noticed that GDB was sending "vCont;t:-1" instead of just "vCont;t" when
stopping all threads, and multiprocess extensions are off.  The -1 in there
is only defined when multi-process extensions are enabled, in the form of
"vCont;t:pPID.-1", for stopping all threads of PID.

The below fixes it.  I'm checking it in.

-- 
Pedro Alves

2009-03-28  Pedro Alves  <pedro@codesourcery.com>

	* remote.c (remote_stop_ns): If multi-process extensions are off,
	and GDB is requesting the whole process to stop, sent "vCont;t",
	not "vCont;t:-1"

---
 gdb/remote.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: src/gdb/remote.c
===================================================================
--- src.orig/gdb/remote.c	2009-03-28 00:48:18.000000000 +0000
+++ src/gdb/remote.c	2009-03-28 01:00:50.000000000 +0000
@@ -3945,13 +3945,13 @@ remote_stop_ns (ptid_t ptid)
   if (!rs->support_vCont_t)
     error (_("Remote server does not support stopping threads"));
 
-  if (ptid_equal (ptid, minus_one_ptid))
+  if (ptid_equal (ptid, minus_one_ptid)
+      || (!remote_multi_process_p (rs) && ptid_is_pid (ptid)))
     p += xsnprintf (p, endp - p, "vCont;t");
   else
     {
       ptid_t nptid;
 
-      /* Step inferior_ptid.  */
       p += xsnprintf (p, endp - p, "vCont;t:");
 
       if (ptid_is_pid (ptid))


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