This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Use elfcore_write_linux_prstatus in gdb
- From: Pedro Alves <palves at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Alan Modra <amodra at gmail dot com>, Binutils <binutils at sourceware dot org>, GDB <gdb-patches at sourceware dot org>
- Date: Thu, 21 Jan 2016 14:26:11 +0000
- Subject: Re: Use elfcore_write_linux_prstatus in gdb
- Authentication-results: sourceware.org; auth=none
- References: <20160121092855 dot GJ17028 at bubble dot grove dot modra dot org> <56A0CE51 dot 1090709 at redhat dot com> <56A0D901 dot 7010709 at redhat dot com> <CAMe9rOqBr_AO5NVBTAe93kJi-FqKrhJnYZBZQjtNWsdDU85YMw at mail dot gmail dot com> <56A0E594 dot 2080303 at redhat dot com> <CAMe9rOoYJcX6WODb-e8jLPOzK6hE7KhYcPyuV91SjWe1A-8y=w at mail dot gmail dot com>
On 01/21/2016 02:17 PM, H.J. Lu wrote:
> On Thu, Jan 21, 2016 at 6:05 AM, Pedro Alves <palves@redhat.com> wrote:
>> On 01/21/2016 01:24 PM, H.J. Lu wrote:
>>> Please take a look at bfd/hosts/x86-64linux.h to see how to dump core
>>> x86-64.
>>
>> I don't have x32 setup on my machine. AFAICS, elf_prstatusx32 is exactly
>> like elf_prstatus32, except it takes a 64-bit regset.
...
>>
>> elfcore_write_linux_prstatus32 should be reached. Other than that,
>> I have no idea (other than installing the stop gap on x32 too).
>>
>
> x32 has different core types (core layout) from m32 and m64.
> See bfd/hosts/x86-64linux.h for details.
As I said, "AFAICS, elf_prstatusx32 is exactly like elf_prstatus32,
except it takes a 64-bit regset." It's probably an issue
of alignment/padding?
> You need
> elfcore_write_linux_prstatusx32 or change
> elfcore_write_linux_prstatus32 to suport x32.
I really can't be working further on this myself right now, sorry.
I've updated the branch to install the stop-gap on x32 as well, which
really ends up calling the same function we call today.
Please give it a try.
Thanks,
Pedro Alves