From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28230 invoked by alias); 31 Oct 2011 18:11:25 -0000 Received: (qmail 28222 invoked by uid 22791); 31 Oct 2011 18:11:24 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from qmta09.emeryville.ca.mail.comcast.net (HELO qmta09.emeryville.ca.mail.comcast.net) (76.96.30.96) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 31 Oct 2011 18:11:10 +0000 Received: from omta23.emeryville.ca.mail.comcast.net ([76.96.30.90]) by qmta09.emeryville.ca.mail.comcast.net with comcast id rUQs1h0031wfjNsA9WB2xN; Mon, 31 Oct 2011 18:11:02 +0000 Received: from up.mrs.kithrup.com ([24.4.193.8]) by omta23.emeryville.ca.mail.comcast.net with comcast id rW9g1h01Z0BKwT48jW9hJn; Mon, 31 Oct 2011 18:09:41 +0000 From: Mike Stump Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: remote-sim.h Date: Mon, 31 Oct 2011 23:24:00 -0000 Message-Id: <42696E6D-92F3-4F66-B2C9-D79C76B12D2F@comcast.net> To: gdb-patches@sourceware.org Mime-Version: 1.0 (Apple Message framework v1084) 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 X-SW-Source: 2011-10/txt/msg00824.txt.bz2 So, gdb includes remote-sim.h, but CORE_ADDR_TYPE isn't defined by the time= the header is included. On my platform, CORE_ADDR_TYPE is defined in sim-= main.h. I checked and the BFD bits are defined, so, I just use them as a f= allback, works for my purposes. I don't think this is the cleanest solutio= n, so I don't think this is the right patch for the tree. So, I kinda want= to include sim-basics.h before this point, as that file, the sim people de= cided, would ensure that CORE_ADDR_TYPE is defined. So, we can include tha= t file here? The problem is, there is no -I for any of the sim things, and= that header will want to include things like cconfig.h... Ick. I kinda w= ant the api to just use a fixed type that is big enough for any of the bfd = targets and be done with it. Thoughts? Index: include/gdb/remote-sim.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- include/gdb/remote-sim.h (revision 1866) +++ include/gdb/remote-sim.h (working copy) @@ -32,8 +32,12 @@ extern "C" { gdb does (unsigned int - from defs.h). */ =20 #ifndef CORE_ADDR_TYPE +#if BFD_ARCH_SIZE <=3D 32 typedef unsigned int SIM_ADDR; #else +typedef unsigned long SIM_ADDR; +#endif +#else typedef CORE_ADDR_TYPE SIM_ADDR; #endif =20