From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61719 invoked by alias); 15 Feb 2017 03:08:05 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 61670 invoked by uid 89); 15 Feb 2017 03:08:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=0xffffffff, 8000 X-HELO: smtp.gentoo.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Feb 2017 03:08:02 +0000 Received: from vapier (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id 3E60B34164E; Wed, 15 Feb 2017 03:08:01 +0000 (UTC) Date: Wed, 15 Feb 2017 03:08:00 -0000 From: Mike Frysinger To: Cedric Jehasse Cc: gdb@sourceware.org Subject: Re: Frame.pc () python function returns a 64-bit value on with a 32-bit mips target Message-ID: <20170215030800.GM28432@vapier> Mail-Followup-To: Cedric Jehasse , gdb@sourceware.org References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="/ZYM6PqDyfNytx60" Content-Disposition: inline In-Reply-To: X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00035.txt.bz2 --/ZYM6PqDyfNytx60 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 693 On 10 Feb 2017 09:32, Cedric Jehasse wrote: > i have built gdb from git configured with ./configure --target=3Dmipsisa3= 2-elf. > I use gdb to connect to openocd which is connected using JTAG to a > 32-bit little endian mips. >=20 > When i to use the python api to print the pc, it prints a 64-bit > address with the upper 32-bits set to 0xffffffff. Eg. > (gdb) python print hex(gdb.newest_frame().pc()) > 0xffffffff803453fcL >=20 > The addresses printed in gdb's cli are all 32-bit. >=20 > Is there something wrong in my configuration? supposedly on mips, the ABI says addresses are sign extended. since the high bit is set (0x8000 0000), it gets extended into 0xffff ffff 8000 0000. -mike --/ZYM6PqDyfNytx60 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAlijxg8ACgkQQWM7n+g3 9YHK5A//QLQ8VhAqF2pYsYzHZKoxsk22/mAQ41tDGA0zKbmN7mdOYyDwm9GCjrCn ppegQ8EGapxMMXLVVS1c3gFvs7ZQO1v0yojNQ2GLINO8EGyp+vnr+zEQ8E31XI+a Y79NBqfCbaY7jNjfm7cFngzTBRB5DkviDLlBRnEmIjtj9MFiyvNt3RfZrVCEb8Cr mFtsTTkhGkW167m9LbNhiXemXaZUOoJKWSzjLDsoYA4aco2o710XrCOV24nVmjLm Z/uvV/swBbaxKyL6Hxnpm97l649Xkc6f0jas3SfsbPQlfs84XQCV8/ygxdFRgw2H 8iLd5v9k/CaJ9vNJ7qntM3SOrRprUHa2In+5+ROSAqxiLNeFzRjgHKQM0FNRUEmt G3DWQ5jD/qQNrFp4VCwVpzEOduWaMBD4bQZPVyY7wzh+ojbCrE3BAOqJ8EWYSIB/ FMRfEQ4on4inuzBPA8NypBpkGfi7tPonxnbfoX/o0CFTl3d1BojdCaOTIwgk81yA gBvB6vP4KMilxHbvfq8xWM9JXrrF6gyO66fUdpst74upZJ+uMsqbc4kPBHh5x0mE C5HwCkHMzgJd6aG31FgN1eB5cKWR6x3HylrmXfZeLjVEnsosEeVyXZSXatj0QG6U RaU/lL6/B7JARrz6IdduaXb7ipGOVu3jbPubt0FSRw5IhZWIV/I= =oiG9 -----END PGP SIGNATURE----- --/ZYM6PqDyfNytx60--