Message ID | 87lhppnb33.fsf@kepler.schwinge.homeip.net |
---|---|
State | New, archived |
Headers |
Received: (qmail 19938 invoked by alias); 11 Sep 2014 20:42:36 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 19925 invoked by uid 89); 11 Sep 2014 20:42:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Sep 2014 20:42:33 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XSBCI-0001xl-1M from Thomas_Schwinge@mentor.com ; Thu, 11 Sep 2014 13:42:30 -0700 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.181.6; Thu, 11 Sep 2014 21:42:28 +0100 From: Thomas Schwinge <thomas@codesourcery.com> To: Andreas Arnez <arnez@linux.vnet.ibm.com> CC: <gdb-patches@sourceware.org> Subject: Re: [PATCH v3 02/13] regcache: Add functions suitable for regset_supply/collect. In-Reply-To: <1406804686-9437-3-git-send-email-arnez@linux.vnet.ibm.com> References: <1406804686-9437-1-git-send-email-arnez@linux.vnet.ibm.com> <1406804686-9437-3-git-send-email-arnez@linux.vnet.ibm.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.3.1 (i486-pc-linux-gnu) Date: Thu, 11 Sep 2014 22:42:08 +0200 Message-ID: <87lhppnb33.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" |
Commit Message
Thomas Schwinge
Sept. 11, 2014, 8:42 p.m. UTC
Hi! On Thu, 31 Jul 2014 13:04:35 +0200, Andreas Arnez <arnez@linux.vnet.ibm.com> wrote: > These functions are intended to suit all targets that don't require too > special logic in their regset supply/collect methods. Having such > generic functions helps reducing target-specific complexity. > > gdb/ > * regcache.c: Include "regset.h". > (regcache_transfer_regset): New local function. > (regcache_supply_regset, regcache_collect_regset): New functions. > * regcache.h (struct regcache_map_entry): New structure. > (REGCACHE_MAP_SKIP): New enum value. > (regcache_supply_regset, regcache_collect_regset): New prototypes. > --- a/gdb/regcache.h > +++ b/gdb/regcache.h > +extern void regcache_supply_regset (const struct regset *regset, > + struct regcache *regcache, > + int regnum, const void *buf, > + size_t size); > +extern void regcache_collect_regset (const struct regset *regset, > + const struct regcache *regcache, > + int regnum, void *buf, size_t size); > + A tiny fix to that: commit a01cbb490b34eda832c0215b8447e6aef68b0278 Author: Thomas Schwinge <thomas@codesourcery.com> Date: Thu Sep 11 22:30:23 2014 +0200 Make gdb/regcache.h self-contained. gdb/ * regcache.h (struct regset): Declare. Commit 0b3092721e5cfa1697f1dafe81efefdbb0236f21 added uses of struct regset to gdb/regcache.h, but that struct is not declared in this file, and, as it happens, also nowhere else in the #include chain on x86 GNU/Hurd. This results in warnings/errors such as: gcc-4.8 [...] ../../W._C._Handy/gdb/gdb.c In file included from ./nm.h:25:0, from ../../W._C._Handy/gdb/defs.h:454, from ../../W._C._Handy/gdb/gdb.c:19: ../../W._C._Handy/gdb/regcache.h:190:9: warning: 'struct regset' declared inside parameter list [enabled by default] size_t size); ^ ../../W._C._Handy/gdb/regcache.h:190:9: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] ../../W._C._Handy/gdb/regcache.h:193:10: warning: 'struct regset' declared inside parameter list [enabled by default] int regnum, void *buf, size_t size); ^ --- gdb/ChangeLog | 4 ++++ gdb/regcache.h | 1 + 2 files changed, 5 insertions(+) Grüße, Thomas
Comments
On Thu, Sep 11 2014, Thomas Schwinge wrote: > commit a01cbb490b34eda832c0215b8447e6aef68b0278 > Author: Thomas Schwinge <thomas@codesourcery.com> > Date: Thu Sep 11 22:30:23 2014 +0200 > > Make gdb/regcache.h self-contained. > > gdb/ > * regcache.h (struct regset): Declare. > > Commit 0b3092721e5cfa1697f1dafe81efefdbb0236f21 added uses of struct regset to > gdb/regcache.h, but that struct is not declared in this file, and, as it > happens, also nowhere else in the #include chain on x86 GNU/Hurd. This results > in warnings/errors such as: > > gcc-4.8 [...] ../../W._C._Handy/gdb/gdb.c > In file included from ./nm.h:25:0, > from ../../W._C._Handy/gdb/defs.h:454, > from ../../W._C._Handy/gdb/gdb.c:19: > ../../W._C._Handy/gdb/regcache.h:190:9: warning: 'struct regset' declared inside parameter list [enabled by default] > size_t size); > ^ > ../../W._C._Handy/gdb/regcache.h:190:9: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] > ../../W._C._Handy/gdb/regcache.h:193:10: warning: 'struct regset' declared inside parameter list [enabled by default] > int regnum, void *buf, size_t size); > ^ Right. Sorry for the breakage.
> Make gdb/regcache.h self-contained. > > gdb/ > * regcache.h (struct regset): Declare. Thank you. This is OK, so please go ahead and push if not already done.
diff --git gdb/ChangeLog gdb/ChangeLog index 676de56..30112cb 100644 --- gdb/ChangeLog +++ gdb/ChangeLog @@ -1,3 +1,7 @@ +2014-09-11 Thomas Schwinge <thomas@codesourcery.com> + + * regcache.h (struct regset): Declare. + 2014-09-11 Pedro Alves <palves@redhat.com> PR gdb/17347 diff --git gdb/regcache.h gdb/regcache.h index 0361f22..0e0b84b 100644 --- gdb/regcache.h +++ gdb/regcache.h @@ -21,6 +21,7 @@ #define REGCACHE_H struct regcache; +struct regset; struct gdbarch; struct address_space;