From: Pedro Alves <palves@redhat.com>
To: Jiong Wang <jiong.wang@arm.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [PATCH] Fix build without libexpat (Re: [PATCH 1/4] Merge remote thread listing methods)
Date: Fri, 17 Oct 2014 10:17:00 -0000 [thread overview]
Message-ID: <5440ECBC.5060202@redhat.com> (raw)
In-Reply-To: <5440D9FB.8000509@arm.com>
Hi Jiong,
> looks like this change break arm native build on chrome book.
>
> clear_threads_listing_context only exist when HAVE_LIBEXPACT defined.
Thanks, fixed with the patch below. Though you should really link
with libexpat. gdb processes built-in xml files even when
native debugging.
----
From 80134cf5b3ca1f75a96af1856fdaad29ad1f57aa Mon Sep 17 00:00:00 2001
From: Pedro Alves <palves@redhat.com>
Date: Fri, 17 Oct 2014 11:05:06 +0100
Subject: [PATCH] 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.
---
gdb/ChangeLog | 5 +++++
gdb/remote.c | 30 +++++++++++++++---------------
2 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 62d1d06..1ea76a5 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2014-10-17 Pedro Alves <palves@redhat.com>
+
+ * remote.c (clear_threads_listing_context): Move higher up, out of
+ the HAVE_LIBEXPAT guard.
+
2014-10-16 Tristan Gingold <gingold@adacore.com>
* i386-darwin-nat.c (i386_darwin_fetch_inferior_registers)
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. */
--
1.9.3
next prev parent reply other threads:[~2014-10-17 10:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-02 16:21 [PATCH 0/4] remote thread listing: get rid of unnecessary "thread alive?" traffic Pedro Alves
2014-10-02 16:21 ` [PATCH 1/4] Merge remote thread listing methods Pedro Alves
2014-10-17 8:57 ` Jiong Wang
2014-10-17 10:17 ` Pedro Alves [this message]
2014-10-17 10:21 ` [PATCH] Fix build without libexpat (Re: [PATCH 1/4] Merge remote thread listing methods) Jiong Wang
2014-10-02 16:21 ` [PATCH 3/4] remote: get rid of all the T packets when synching the thread list Pedro Alves
2014-10-02 16:21 ` [PATCH 2/4] Push pruning old threads down to the target Pedro Alves
2016-12-09 6:38 ` Thomas Schwinge
2014-10-02 16:21 ` [PATCH 4/4] DEC threads: Simplify updating the thread list Pedro Alves
2014-10-02 18:46 ` Mark Kettenis
2014-10-03 9:12 ` Pedro Alves
2014-10-15 22:01 ` [pushed] Re: [PATCH 0/4] remote thread listing: get rid of unnecessary "thread alive?" traffic Pedro Alves
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=5440ECBC.5060202@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jiong.wang@arm.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