From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 41074 invoked by alias); 24 Mar 2015 09:39:24 -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 41059 invoked by uid 89); 24 Mar 2015 09:39:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: bin-vsp-out-02.atm.binero.net Received: from vsp-authed01.binero.net (HELO bin-vsp-out-02.atm.binero.net) (195.74.38.224) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 24 Mar 2015 09:39:22 +0000 X-Halon-ID: a3188cfb-d209-11e4-8eab-005056917f90 Authorized-sender: jiri@gaisler.se Received: from [192.168.9.20] (unknown [78.68.173.120]) by bin-vsp-out-02.atm.binero.net (Halon Mail Gateway) with ESMTPA for ; Tue, 24 Mar 2015 10:39:16 +0100 (CET) Message-ID: <551130C3.8050403@gaisler.se> Date: Tue, 24 Mar 2015 09:39:00 -0000 From: Jiri Gaisler User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: Re: [PATCH v4 03/13] sim/erc32: Switched emulated memory to host endian order. References: <1426626170-21401-1-git-send-email-jiri@gaisler.se> <1426626170-21401-4-git-send-email-jiri@gaisler.se> <20150323024519.GB8039@vapier> In-Reply-To: <20150323024519.GB8039@vapier> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lK9tpTc8CX5OsHQB6OmprEei256oTepAw" X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00784.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --lK9tpTc8CX5OsHQB6OmprEei256oTepAw Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 754 On 23/03/15 03:45, Mike Frysinger wrote: > On 17 Mar 2015 22:02, Jiri Gaisler wrote: >> --- a/sim/erc32/erc32.c >> +++ b/sim/erc32/erc32.c >> sregs.freq =3D freq ? freq : 15; >> termsave =3D fcntl(0, F_GETFL, 0); >> INIT_DISASSEMBLE_INFO(dinfo, stdout,(fprintf_ftype)fprintf); >> +#ifdef HOST_LITTLE_ENDIAN >> + dinfo.endian =3D BFD_ENDIAN_LITTLE; >> +#else >> dinfo.endian =3D BFD_ENDIAN_BIG; >> +#endif >=20 > can't you get the target endian info via the bfd library ? bfd can tell me the byte order of the data sections in a file, but not how the data is actually stored in the memory of the host. Since sis always stores in host order, dinfo.endian must have the order of the host, and not the bfd order of a file. Jiri. --lK9tpTc8CX5OsHQB6OmprEei256oTepAw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 884 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJVETDDAAoJEIAIwBKmO2+b5cQP/iJU7BPHjUAaPyVdVhFwPfge vxRYGqM7hGtoBcLyS5lXwh2Oj44kN4qLm2xY4plVVgxa8aJsYo+Xtxp+3TyHEspF hmVCi7ZvASs/7mAlQeuBUbSNEefwL+wY4rbTCwX4w9F2C/ir6zUb6BripciNz6S4 FwNJpuhtXiCVZFGdx2fYbF+dtt9xM1CgECT8eis235YXHQKG8TYy613dvaA2vufv XPRiM5u9ZK0cT14cp1muTXqXisYil6Dmit8orF1PHFSuP91WOSyAjjP7byR18Sip bPWGw3AIYoaEHHBScGGEFqBIPScwaL+yYyanxtyRHV7Hsl6l8aMJsdvGQMzztSF2 sYtj4sYXhhN7e8dRsFrSVBv+hBJ+w7vtAn7f9ARvQsSQG3ymmet0xsTeDggaiPLU zz9y56ZXUu57nLCFll7DIBEMzYBU6X951Z+n2xyxZr3x8istxvz8KCYbhXrG2tuR 10GA5200TJqGmovPRG4p79ElSbuNo8fgY0C+XRZ/NsQ5V6CemjP0KLWdsrAxl8Dk adX8ht7lTVzp9ozbXkyNO3MTHjpQsmMpA5zDbkupVONnvUGCJH5peIvAF+F5Wyz6 jbruYWZrB8Hw5cC7NHAB8HzA9wwDQYcgDmu/FRf4dt6G0h/QQ0H73NYwuy6NO2cE iDr5ED5JjFZfTizRd0E4 =mSpu -----END PGP SIGNATURE----- --lK9tpTc8CX5OsHQB6OmprEei256oTepAw--