From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2965 invoked by alias); 1 Nov 2011 03:55:07 -0000 Received: (qmail 2956 invoked by uid 22791); 1 Nov 2011 03:55:06 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Nov 2011 03:54:52 +0000 Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 9D07D1B4006; Tue, 1 Nov 2011 03:54:51 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: Re: remote-sim.h Date: Tue, 01 Nov 2011 03:55:00 -0000 User-Agent: KMail/1.13.7 (Linux/3.1.0-rc4; KDE/4.6.5; x86_64; ; ) Cc: Mike Stump References: <42696E6D-92F3-4F66-B2C9-D79C76B12D2F@comcast.net> In-Reply-To: <42696E6D-92F3-4F66-B2C9-D79C76B12D2F@comcast.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1365032.EJaKbWy8FB"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201110312354.53063.vapier@gentoo.org> X-IsSubscribed: yes 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-11/txt/msg00000.txt.bz2 --nextPart1365032.EJaKbWy8FB Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 1543 On Monday 31 October 2011 14:11:08 Mike Stump wrote: > So, gdb includes remote-sim.h, but CORE_ADDR_TYPE isn't defined by the ti= me > 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 fallback, works for my purposes. I don't think this is the cleanest > solution, 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 decided, would ensure that CORE_ADDR_TYPE is defined. So, we > can include that 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...= =20 > Ick. I kinda want the api to just use a fixed type that is big enough for > any of the bfd targets and be done with it. Thoughts? >=20 > --- 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 i'm guessing you're creating a 64bit simulator. this setup won't work when= =20 building on a 32bit system as unsigned long will still be 32bit. i wonder = if=20 bfd_vma would be appropriate as a default instead, but i'm not sure of the= =20 exact purpose of that type ... -mike --nextPart1365032.EJaKbWy8FB Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. Content-length: 836 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJOr22NAAoJEEFjO5/oN/WB4CcP/2oIG7sKzEpY7C9xLnpai1Fz zPWa531EMjSnj5zijFABUO2uysbOQ4wXYUFiP3gNRKHXFy1Z8u+1Gtvoo/8w6Sz0 c4cyMwZ3fN4V2J+0Rf8wclS45TcUjVvitgLMwylhFITn3zb5qshG4VAJ1GdP2rv8 e143/B0jg9Jf4RxHxKtzHDCriQziWBcCVbbaOwR31J0hEwkyrETuwY/6wopXfmwX 1mqTXp/w6BPM8axLq+As3hTq0tZK/851ZrFI6u8ZiQCHtwxK9SU8xsNkqiHysNIu yh+MJ6UBwXfAloprhE34tYFIRdxwP3abQOtMXZPEQz9MuoSqDwl8nPnoHwUnSxO/ 6SAabMXGGgOP3x72HmPzoX8/kt4YTQ8JMWQ+GdQW0GwI4q/A+EeceXY4mpiT8sOR r5oUnErjVt1+sidsbRRfcV5PIk7E4s+P9aCncd6JRCxgLztiOgKdXShxJ9zPujxn B4pxaxtEXl0uzBAfIbmz8crPjyTRRdo96HPzmL/1ngjPZtWs/8ciDmymHoO/dq+C 7RB2SyrBZFDn9w2HpHj1HO65gXN7RtQVrJUEhLBLcUpbpmRyejYfneTqi4H9L8t9 yJUgHCI9o3TKQwSdXvk0sCdJvJ1eIMpkNR1lS+1oK1keN80pR+5O5cbbiufLFSTs 5CPnH0so1eLu1x7FaELH =gb/x -----END PGP SIGNATURE----- --nextPart1365032.EJaKbWy8FB--