* Frame.pc () python function returns a 64-bit value on with a 32-bit mips target @ 2017-02-10 8:32 Cedric Jehasse 2017-02-15 3:08 ` Mike Frysinger 0 siblings, 1 reply; 2+ messages in thread From: Cedric Jehasse @ 2017-02-10 8:32 UTC (permalink / raw) To: gdb Hi, 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? Thanks, Cedric ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Frame.pc () python function returns a 64-bit value on with a 32-bit mips target 2017-02-10 8:32 Frame.pc () python function returns a 64-bit value on with a 32-bit mips target Cedric Jehasse @ 2017-02-15 3:08 ` Mike Frysinger 0 siblings, 0 replies; 2+ messages in thread From: Mike Frysinger @ 2017-02-15 3:08 UTC (permalink / raw) To: Cedric Jehasse; +Cc: gdb [-- 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 --] ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-15 3:08 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-02-10 8:32 Frame.pc () python function returns a 64-bit value on with a 32-bit mips target Cedric Jehasse 2017-02-15 3:08 ` Mike Frysinger
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox