This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 2/3] remove all_lwps from gdbserver: use list api
- From: Pedro Alves <palves at redhat dot com>
- To: Doug Evans <dje at google dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Thu, 20 Feb 2014 13:40:26 +0000
- Subject: Re: [PATCH v2 2/3] remove all_lwps from gdbserver: use list api
- Authentication-results: sourceware.org; auth=none
- References: <yjt2ob2ud5fo dot fsf at ruffy dot mtv dot corp dot google dot com> <52F37FC2 dot 5040001 at redhat dot com> <CADPb22TJVW-PhE0Spz9mL-xsg6HKRYKYo+gwSWMp6RfQRvF6PQ at mail dot gmail dot com>
On 02/19/2014 11:31 PM, Doug Evans wrote:
> 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:
> Committed with the suggested changes.
>
Thanks!
(Note that we request contributors to always post what goes into
the tree, if there were changes since the last post / approval,
so I think we should get into the habit of doing that ourselves too.)
>>> +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.
I noticed a little buglet slipped here:
+/* Return a pointer to the first inferior in 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 (struct inferior_list *list)
+{
+ if (all_threads.head != NULL)
+ return all_threads.head;
Should be:
if (list->head != NULL)
return list->head;
Thanks again for doing this.
--
Pedro Alves