This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix BZ15121 -- x/a broken for addresses in shared libraries


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]