Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Pedro Alves <palves@redhat.com>
Cc: Simon Marchi <simon.marchi@ericsson.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3] gdbserver: Remove gdb_id_to_thread_id
Date: Fri, 15 Sep 2017 13:07:00 -0000	[thread overview]
Message-ID: <a4e87ad78901e49d3889cb58d2837b8d@polymtl.ca> (raw)
In-Reply-To: <c66183b6-dc70-4312-61fa-909b07791ba4@redhat.com>

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


  reply	other threads:[~2017-09-15 13:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-10 20:11 [PATCH 0/3] Small cleanups in gdbserver Simon Marchi
2017-09-10 20:11 ` [PATCH 2/3] gdbserver: Remove gdb_id_to_thread_id Simon Marchi
2017-09-15 10:55   ` Pedro Alves
2017-09-15 13:07     ` Simon Marchi [this message]
2017-09-15 13:34       ` Simon Marchi
2017-09-15 13:44     ` Simon Marchi
2017-09-10 20:11 ` [PATCH 3/3] gdbserver: Remove thread_to_gdb_id Simon Marchi
2017-09-15 11:02   ` Pedro Alves
2017-09-15 13:54     ` Simon Marchi
2017-09-15 14:00       ` Pedro Alves
2017-09-10 20:11 ` [PATCH 1/3] gdbserver: Remove duplicate functions to find any thread of process Simon Marchi
2017-09-15  4:09   ` Sergio Durigan Junior
2017-09-15 12:53     ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a4e87ad78901e49d3889cb58d2837b8d@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=simon.marchi@ericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox