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]

Remove handling of Hs packet from gdbserver


Dan mentioned to remove Hs, but it seems it has not been done yet:

http://sourceware.org/ml/gdb-patches/2003-10/msg00428.html

This patch removes it. Tested natively on x86_64 Linux.

OK?

Regards,
Jie
2011-08-13  Jie Zhang  <jzhang918@gmail.com>

	* server.c (step_thread): Remove definition.
	(process_serial_event): Don't handle Hs.
	* server.h (step_thread): Remove declaration.
	* target.c (set_desired_inferior): Remove use of step_thread.

Index: server.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/server.c,v
retrieving revision 1.146
diff -u -p -r1.146 server.c
--- server.c	21 Jul 2011 23:46:12 -0000	1.146
+++ server.c	13 Aug 2011 13:31:28 -0000
@@ -32,7 +32,6 @@
 
 ptid_t cont_thread;
 ptid_t general_thread;
-ptid_t step_thread;
 
 int server_waiting;
 
@@ -2912,8 +2911,6 @@ process_serial_event (void)
 	    }
 	  else if (own_buf[1] == 'c')
 	    cont_thread = thread_id;
-	  else if (own_buf[1] == 's')
-	    step_thread = thread_id;
 
 	  write_ok (own_buf);
 	}
Index: server.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/server.h,v
retrieving revision 1.84
diff -u -p -r1.84 server.h
--- server.h	21 Jul 2011 23:46:12 -0000	1.84
+++ server.h	13 Aug 2011 13:31:28 -0000
@@ -282,7 +282,6 @@ void unloaded_dll (const char *name, COR
 
 extern ptid_t cont_thread;
 extern ptid_t general_thread;
-extern ptid_t step_thread;
 
 extern int server_waiting;
 extern int debug_threads;
Index: target.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/target.c,v
retrieving revision 1.21
diff -u -p -r1.21 target.c
--- target.c	1 Jan 2011 15:33:24 -0000	1.21
+++ target.c	13 Aug 2011 13:31:28 -0000
@@ -31,21 +31,7 @@ set_desired_inferior (int use_general)
   if (use_general == 1)
     found = find_thread_ptid (general_thread);
   else
-    {
-      found = NULL;
-
-      /* If we are continuing any (all) thread(s), use step_thread
-	 to decide which thread to step and/or send the specified
-	 signal to.  */
-      if ((!ptid_equal (step_thread, null_ptid)
-	   && !ptid_equal (step_thread, minus_one_ptid))
-	  && (ptid_equal (cont_thread, null_ptid)
-	      || ptid_equal (cont_thread, minus_one_ptid)))
-	found = find_thread_ptid (step_thread);
-
-      if (found == NULL)
-	found = find_thread_ptid (cont_thread);
-    }
+    found = find_thread_ptid (cont_thread);
 
   if (found == NULL)
     current_inferior = (struct thread_info *) all_threads.head;

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