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]

Re: [PATCH 2/3] gdbserver: Remove gdb_id_to_thread_id


On 2017-09-15 12:55, Pedro Alves wrote:
On 09/10/2017 09:11 PM, Simon Marchi wrote:
From what I understand, this function is not doing anything useful as of
today.

Here's the result of my archeological research:


*nod*

--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -4011,7 +4011,6 @@ process_serial_event (void)
   unsigned int len;
   int res;
   CORE_ADDR mem_addr;
-  int pid;
   unsigned char sig;
   int packet_len;
   int new_packet_len = -1;
@@ -4039,92 +4038,96 @@ process_serial_event (void)
       handle_general_set (own_buf);
       break;
     case 'D':
-      require_running (own_buf);
+      {
+	require_running (own_buf);


The reindentation makes it hard to see the actual
change.  Is it just moving the int pid variable, or something else?
IMO, it'd be nicer to move the whole case 'D' body to a
handle_detach function.

Agreed, I'll do a preparatory patch that does that, and then a second version of this one (also taking into account all your other comments).

Thanks,

Simon


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