Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2 2/3] remove all_lwps from gdbserver: use list api
Date: Wed, 19 Feb 2014 23:31:00 -0000	[thread overview]
Message-ID: <CADPb22TJVW-PhE0Spz9mL-xsg6HKRYKYo+gwSWMp6RfQRvF6PQ@mail.gmail.com> (raw)
In-Reply-To: <52F37FC2.5040001@redhat.com>

On Thu, Feb 6, 2014 at 4:27 AM, Pedro Alves <palves@redhat.com> wrote:
> On 01/29/2014 06:11 PM, Doug Evans wrote:
>
>> +/* Return a pointer to the first inferior in the list, or NULL if there
>> +   isn't one.
>> +   This is for cases where the caller needs a thread, but doesn't care
>> +   which one.  */
>> +
>> +struct inferior_list_entry *
>> +get_first_inferior (void)
>> +{
>> +  if (all_threads.head != NULL)
>> +    return all_threads.head;
>
> I think this one, being an "inferior" function, should take
> a list as argument.
>
>> +  return NULL;
>> +}
>> +
>
>> +/* Helper for gdb_agent_about_to_close.
>> +   Return non-zero if thread ENTRY is in the same process in DATA.  */
>> +
>> +static int
>> +same_process_p (struct inferior_list_entry *inf, void *data)
>
> Mismatch between comment and parameter (ENTRY vs inf).
>
> Otherwise looks good to me.
>
> (Note: I noticed that patch 3 had a hunk that should be here:
>
>           if (!non_stop)
>             {
> -             current_inferior = (struct thread_info *) all_threads.head;
> +             current_inferior = get_first_thread ();
> )

Committed with the suggested changes.


  reply	other threads:[~2014-02-19 23:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29 18:11 Doug Evans
2014-02-06 12:27 ` Pedro Alves
2014-02-19 23:31   ` Doug Evans [this message]
2014-02-20 13:40     ` Pedro Alves
2014-02-20 18:18       ` Doug Evans
2014-02-20 18:27         ` Pedro Alves
2014-02-20 21:18 ` Doug Evans
2014-02-20 21:19 ` Doug Evans

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=CADPb22TJVW-PhE0Spz9mL-xsg6HKRYKYo+gwSWMp6RfQRvF6PQ@mail.gmail.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.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