diff options
author | Pedro Alves <palves@redhat.com> | 2014-10-17 11:05:06 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2014-10-17 11:05:06 +0100 |
commit | 80134cf5b3ca1f75a96af1856fdaad29ad1f57aa (patch) | |
tree | 8c0ab6da95724058fb073bd4c8e7416a4f6afd24 /gdb/remote.c | |
parent | 7a3517ffebf218c8f34ce2eaea40ab042ce33f9f (diff) | |
download | gdb-80134cf5b3ca1f75a96af1856fdaad29ad1f57aa.zip gdb-80134cf5b3ca1f75a96af1856fdaad29ad1f57aa.tar.gz gdb-80134cf5b3ca1f75a96af1856fdaad29ad1f57aa.tar.bz2 |
Fix build without libexpat
clear_threads_listing_context is used for thread listing methods other
than the xml based, but it's only defined when HAVE_LIBEXPAT is defined.
gdb/
2014-10-17 Pedro Alves <palves@redhat.com>
* remote.c (clear_threads_listing_context): Move higher up, out of
the HAVE_LIBEXPAT guard.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index 98d3f2a..20f2988 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -2559,6 +2559,21 @@ struct threads_listing_context VEC (thread_item_t) *items; }; +/* Discard the contents of the constructed thread listing context. */ + +static void +clear_threads_listing_context (void *p) +{ + struct threads_listing_context *context = p; + int i; + struct thread_item *item; + + for (i = 0; VEC_iterate (thread_item_t, context->items, i, item); ++i) + xfree (item->extra); + + VEC_free (thread_item_t, context->items); +} + static int remote_newthread_step (threadref *ref, void *data) { @@ -2664,21 +2679,6 @@ const struct gdb_xml_element threads_elements[] = { { NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL } }; -/* Discard the contents of the constructed thread info context. */ - -static void -clear_threads_listing_context (void *p) -{ - struct threads_listing_context *context = p; - int i; - struct thread_item *item; - - for (i = 0; VEC_iterate (thread_item_t, context->items, i, item); ++i) - xfree (item->extra); - - VEC_free (thread_item_t, context->items); -} - #endif /* List remote threads using qXfer:threads:read. */ |