PING: PATCH: PR backtrace/14646: [x32] backtrace doesn't work

H.J. Lu hjl.tools@gmail.com
Mon Oct 15 20:41:00 GMT 2012


On Mon, Oct 15, 2012 at 3:09 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>> Date: Tue, 9 Oct 2012 09:38:32 -0700
>> From: "H.J. Lu" <hjl.tools@gmail.com>
>>
>> The current GDB doesn't work on x32.  This patch:
>>
>> http://sourceware.org/ml/gdb-patches/2012-09/msg00714.html
>>
>> isn't perfect where $pc/$sp is displayed as 64-bit integer.  But
>> otherwise, GDB works fine.
>
> Finally found some time to dig a little bit deeper.  The x32 ABI isn't
> the only 32-bit ABI with 64-bit registers.  The mips n32 ABI has
> exactly the same issue.  The relevant code there carries the following
> comment:
>
>   /* Use pointer types for registers if we can.  For n32 we can not,
>      since we do not have a 64-bit pointer type.  */
>
> So I'd say that you should probably commit the diff in:
>
>    <http://sourceware.org/ml/gdb-patches/2012-09/msg00714.html>
>
> on the grounds that other 32-bit on 64-bit ABIs also punt on the issue.

I checked it into trunk.  OK for 7.5?

> But it would be good to try to come up with a way to print 64-bit
> registers as pointers for this class of ABIs.  But that should almost
> certainly done by fixing target-independent parts of GDB and not by
> adding more complexity to the target descriptions like your last
> couple of diffs did.

I will give it a try.

Thanks.

-- 
H.J.



More information about the Gdb-patches mailing list