This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Fix BZ15121 -- x/a broken for addresses in shared libraries
- From: Pedro Alves <palves at redhat dot com>
- To: Paul Pluzhnikov <ppluzhnikov at google dot com>, Mark Kettenis <mark dot kettenis at xs4all dot nl>
- Cc: gdb-patches ml <gdb-patches at sourceware dot org>, macro at linux-mips dot org
- Date: Thu, 10 Sep 2015 16:07:47 +0100
- Subject: Re: [patch] Fix BZ15121 -- x/a broken for addresses in shared libraries
- Authentication-results: sourceware.org; auth=none
- References: <CALoOobP+FH-rRO-HYOFgu0QrfHwgteeu_ufawVDL9zeyef7h7g at mail dot gmail dot com> <55F19100 dot 30600 at redhat dot com> <201509101433 dot t8AEX5Cw008716 at glazunov dot sibelius dot xs4all dot nl> <CALoOobPcZOgjJ6F2Ufc72y5ZQ+OfiY-xru5B-B4jkAG_qswtow at mail dot gmail dot com>
On 09/10/2015 04:00 PM, Paul Pluzhnikov wrote:
> On Thu, Sep 10, 2015 at 7:33 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>
>>> From: Pedro Alves <palves@redhat.com>
>
>>> Do we need to keep sign-extending on MIPS? Adding Maciej.
>>
>> I'm pretty sure you do.
>
> What makes MIPS special?
>
> I can't imagine any reason why (upper levels of) 64-bit GDB would need
> to be lied to that the 32-bit inferior's 0x80000004 pointer has
> CORE_ADDR value of 0xFFFFFFFF80000004.
MIPS has signed addresses, at the hardware level. Thus a 32-bit ABI on
a 64-bit machine ends up seeing with sign-extended addresses.
See e.g.:
https://www.sourceware.org/ml/gdb/2002-09/msg00084.html
Thanks,
Pedro Alves