From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6794 invoked by alias); 17 Oct 2014 10:21:58 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 6781 invoked by uid 89); 17 Oct 2014 10:21:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 17 Oct 2014 10:21:56 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Fri, 17 Oct 2014 11:21:53 +0100 Received: from [10.1.205.157] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 17 Oct 2014 11:21:51 +0100 Message-ID: <5440EDBF.7020306@arm.com> Date: Fri, 17 Oct 2014 10:21:00 -0000 From: Jiong Wang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Pedro Alves , "gdb-patches@sourceware.org" Subject: Re: [PATCH] Fix build without libexpat (Re: [PATCH 1/4] Merge remote thread listing methods) References: <1412266896-28210-1-git-send-email-palves@redhat.com> <1412266896-28210-2-git-send-email-palves@redhat.com> <5440D9FB.8000509@arm.com> <5440ECBC.5060202@redhat.com> In-Reply-To: <5440ECBC.5060202@redhat.com> X-MC-Unique: 114101711215300701 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00461.txt.bz2 On 17/10/14 11:17, Pedro Alves wrote: > 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. I see, great, thanks! Regards, Jiong > > ---- > >From 80134cf5b3ca1f75a96af1856fdaad29ad1f57aa Mon Sep 17 00:00:00 2001 > From: Pedro Alves > 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 > > * 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 > + > + * remote.c (clear_threads_listing_context): Move higher up, out of > + the HAVE_LIBEXPAT guard. > + > 2014-10-16 Tristan Gingold >=20=20=20 > * 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; > }; >=20=20=20 > +/* Discard the contents of the constructed thread listing context. */ > + > +static void > +clear_threads_listing_context (void *p) > +{ > + struct threads_listing_context *context =3D p; > + int i; > + struct thread_item *item; > + > + for (i =3D 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[] = =3D { > { NULL, NULL, NULL, GDB_XML_EF_NONE, NULL, NULL } > }; >=20=20=20 > -/* Discard the contents of the constructed thread info context. */ > - > -static void > -clear_threads_listing_context (void *p) > -{ > - struct threads_listing_context *context =3D p; > - int i; > - struct thread_item *item; > - > - for (i =3D 0; VEC_iterate (thread_item_t, context->items, i, item); ++= i) > - xfree (item->extra); > - > - VEC_free (thread_item_t, context->items); > -} > - > #endif >=20=20=20 > /* List remote threads using qXfer:threads:read. */