Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Remove handling of Hs packet from gdbserver
@ 2011-08-13 13:45 Jie Zhang
  2011-08-31 18:14 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Jie Zhang @ 2011-08-13 13:45 UTC (permalink / raw)
  To: gdb-patches; +Cc: drow

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

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

[-- Attachment #2: gdbserver-remove-Hs.diff --]
[-- Type: text/x-patch, Size: 2352 bytes --]

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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Remove handling of Hs packet from gdbserver
  2011-08-13 13:45 Remove handling of Hs packet from gdbserver Jie Zhang
@ 2011-08-31 18:14 ` Pedro Alves
  2011-09-01  3:15   ` Jie Zhang
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2011-08-31 18:14 UTC (permalink / raw)
  To: gdb-patches; +Cc: Jie Zhang, drow

On Saturday 13 August 2011 14:45:21, Jie Zhang wrote:
> 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?

Okay, thanks.

> 
> Regards,
> Jie
> gdbserver-remove-Hs.diff
>   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;

-- 
Pedro Alves


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Remove handling of Hs packet from gdbserver
  2011-08-31 18:14 ` Pedro Alves
@ 2011-09-01  3:15   ` Jie Zhang
  0 siblings, 0 replies; 3+ messages in thread
From: Jie Zhang @ 2011-09-01  3:15 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches, drow

On Wed, Aug 31, 2011 at 2:13 PM, Pedro Alves <pedro@codesourcery.com> wrote:
> On Saturday 13 August 2011 14:45:21, Jie Zhang wrote:
>> 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?
>
> Okay, thanks.
>
Committed. Thank you for review!

Jie


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-01  3:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-13 13:45 Remove handling of Hs packet from gdbserver Jie Zhang
2011-08-31 18:14 ` Pedro Alves
2011-09-01  3:15   ` Jie Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox