From: Mike Frysinger <vapier@gentoo.org>
To: Cedric Jehasse <cedric.jehasse@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Frame.pc () python function returns a 64-bit value on with a 32-bit mips target
Date: Wed, 15 Feb 2017 03:08:00 -0000 [thread overview]
Message-ID: <20170215030800.GM28432@vapier> (raw)
In-Reply-To: <CABvLYuAQN6-W5WCiR0QDBAPVvTxif+yoi+Us+KFEPMs2jVo7Zw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 700 bytes --]
On 10 Feb 2017 09:32, Cedric Jehasse wrote:
> i have built gdb from git configured with ./configure --target=mipsisa32-elf.
> I use gdb to connect to openocd which is connected using JTAG to a
> 32-bit little endian mips.
>
> 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
>
> The addresses printed in gdb's cli are all 32-bit.
>
> 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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2017-02-15 3:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-10 8:32 Cedric Jehasse
2017-02-15 3:08 ` Mike Frysinger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170215030800.GM28432@vapier \
--to=vapier@gentoo.org \
--cc=cedric.jehasse@gmail.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox