From: Alan Modra <amodra@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: "H.J. Lu" <hjl.tools@gmail.com>, John Baldwin <jhb@freebsd.org>,
Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
Binutils <binutils@sourceware.org>, GDB <gdb@sourceware.org>
Subject: Re: Are ppc*_elf_write_core_note Os-specific?
Date: Wed, 20 Jan 2016 03:07:00 -0000 [thread overview]
Message-ID: <20160120030720.GE17028@bubble.grove.modra.org> (raw)
In-Reply-To: <569EBE31.9070902@redhat.com>
On Tue, Jan 19, 2016 at 10:52:33PM +0000, Pedro Alves wrote:
> I think that ideally we'd give the same treatment to
> elfcore_write_prstatus; it's just that nobody ever did the leg work.
Some leg work. For all linux targets except mips n32 which has a
64-bit pr_sigpend and pr_sighold, we have
struct elf_prstatus
{
struct elf_siginfo pr_info;
short int pr_cursig;
unsigned long int pr_sigpend;
unsigned long int pr_sighold;
__pid_t pr_pid;
__pid_t pr_ppid;
__pid_t pr_pgrp;
__pid_t pr_sid;
struct timeval pr_utime;
struct timeval pr_stime;
struct timeval pr_cutime;
struct timeval pr_cstime;
elf_gregset_t pr_reg;
int pr_fpvalid;
};
struct elf_siginfo is three ints, struct timeval is two longs except
for sparc where tv_usec is an int, __pid_t is an int. elf_gregset_t
of course varies. Unless I'm missing some odd target struct alignment
rule, I think that means linux needs a 32-bit and 64-bit variant of
elfcore_write_linux_prprstatus with parameters similar to
elfcore_write_linux_prpsinfo*, and special cases for mips n32 and
sparc64. I'd assume gdb's new elf_internal_linux_prstatus struct
would contain a pointer to and size of regs in target format. Host
format would be messy since some 64-bit targets have the odd 32-bit
reg hidden away in elf_gregset_t.
--
Alan Modra
Australia Development Lab, IBM
prev parent reply other threads:[~2016-01-20 3:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1736699.V7zq9VJIrx@ralph.baldwin.cx>
[not found] ` <20160119001819.GB17028@bubble.grove.modra.org>
2016-01-19 3:14 ` Alan Modra
2016-01-19 10:26 ` Pedro Alves
2016-01-19 16:41 ` H.J. Lu
2016-01-19 19:01 ` John Baldwin
2016-01-19 19:08 ` H.J. Lu
2016-01-19 19:32 ` John Baldwin
2016-01-19 19:35 ` H.J. Lu
2016-01-19 20:29 ` John Baldwin
2016-01-19 20:54 ` Pedro Alves
2016-01-19 21:20 ` H.J. Lu
2016-01-19 21:24 ` H.J. Lu
2016-01-19 22:52 ` Pedro Alves
2016-01-20 3:07 ` Alan Modra [this message]
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=20160120030720.GE17028@bubble.grove.modra.org \
--to=amodra@gmail.com \
--cc=Ulrich.Weigand@de.ibm.com \
--cc=binutils@sourceware.org \
--cc=gdb@sourceware.org \
--cc=hjl.tools@gmail.com \
--cc=jhb@freebsd.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).