From: "H.J. Lu" <hjl.tools@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: Alan Modra <amodra@gmail.com>, Binutils <binutils@sourceware.org>,
GDB <gdb-patches@sourceware.org>
Subject: Re: Use elfcore_write_linux_prstatus in gdb
Date: Thu, 21 Jan 2016 14:17:00 -0000 [thread overview]
Message-ID: <CAMe9rOoYJcX6WODb-e8jLPOzK6hE7KhYcPyuV91SjWe1A-8y=w@mail.gmail.com> (raw)
In-Reply-To: <56A0E594.2080303@redhat.com>
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:
>> On Thu, Jan 21, 2016 at 5:11 AM, Pedro Alves <palves@redhat.com> wrote:
>>> On 01/21/2016 12:25 PM, Pedro Alves wrote:
>>>> On 01/21/2016 09:28 AM, Alan Modra wrote:
>>>>> The gdb side. Nothing fancy here, and no support for targets that
>>>>> need gdbarch_elfcore_write_linux_prstatus, mips n32, sparc64 if
>>>>> writing any of pr_{u,s,cu,cs}time, and probably x86-64 x32.
>>>>
>>>> Thanks a lot for doing all this! I don't have spare cycles either to
>>>> drive this all the way to completion for all archs, I think we can still
>>>> move forward with it, by adding a stop-gap implementation those
>>>> archs, which just calls elfcore_write_prstatus. I'll send it along
>>>> in a bit.
>>>
>>> Like this. I've pushed this to the users/palves/core-prstatus-rework
>>> branch. I've tested on x86_64 with:
>>>
>>> make check RUNTESTFLAGS="--target_board unix/-m32" TESTS="*/*core*.exp"
>>> make check RUNTESTFLAGS="--target_board unix/-m64" TESTS="*/*core*.exp"
>>
>> It failed
>>
>> make check RUNTESTFLAGS="--target_board unix/-mx32" TESTS="*/*core*.exp"
>>
>> 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.
> Given gdbarch_ptr_bit==32 on x32, and:
>
> else if (gdbarch_ptr_bit (data->gdbarch) == 64)
> data->note_data = elfcore_write_linux_prstatus64 (data->obfd,
> data->note_data,
> data->note_size,
> &prstatus);
> else
> data->note_data = elfcore_write_linux_prstatus32 (data->obfd,
> data->note_data,
> data->note_size,
> &prstatus);
>
> 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. You need
elfcore_write_linux_prstatusx32 or change
elfcore_write_linux_prstatus32 to suport x32.
--
H.J.
next prev parent reply other threads:[~2016-01-21 14:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-21 9:29 Alan Modra
2016-01-21 12:25 ` Pedro Alves
2016-01-21 13:11 ` Pedro Alves
2016-01-21 13:24 ` H.J. Lu
2016-01-21 14:05 ` Pedro Alves
2016-01-21 14:17 ` H.J. Lu [this message]
2016-01-21 14:26 ` Pedro Alves
2016-01-21 14:33 ` H.J. Lu
2016-01-21 14:44 ` Alan Modra
2016-01-21 15:59 ` H.J. Lu
2016-01-21 16:02 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMe9rOoYJcX6WODb-e8jLPOzK6hE7KhYcPyuV91SjWe1A-8y=w@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox