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: Doug Evans <dje at google dot com>
- To: gdb-patches at sourceware dot org
- Date: Thu, 20 Feb 2014 13:19:28 -0800
- 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>
Doug Evans writes:
> Hi.
> This patch provides missing API routines where necessary,
> and removes all references to list implementation details
> outside of inferiors.c.
This patch fixes a buglet that was introduced.
Committed.
2014-02-20 Doug Evans <dje@google.com>
* inferiors.c (get_first_inferior): Fix buglet.
diff --git a/gdb/gdbserver/inferiors.c b/gdb/gdbserver/inferiors.c
index f83ee22..8c1375f 100644
--- a/gdb/gdbserver/inferiors.c
+++ b/gdb/gdbserver/inferiors.c
@@ -178,8 +178,8 @@ remove_thread (struct thread_info *thread)
struct inferior_list_entry *
get_first_inferior (struct inferior_list *list)
{
- if (all_threads.head != NULL)
- return all_threads.head;
+ if (list->head != NULL)
+ return list->head;
return NULL;
}