linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* RFC: ARM: Support for VFP/NEON registers in coredumps
@ 2011-03-24 14:18 Dave Martin
  2011-03-24 14:48 ` Mikael Pettersson
  2011-03-24 14:57 ` Ulrich Weigand
  0 siblings, 2 replies; 12+ messages in thread
From: Dave Martin @ 2011-03-24 14:18 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

Considering how to add the VFP/NEON register state to Coredumps,
there's no single obvious solution, so I'd like to put this out
for people's comments.

Currently, the coredump consists of several notes, the interesting
ones currently being:

 * NT_PRSTATUS - general process status, including the integer registers
 * NT_FPREGSET - the FPA registers (only present if FPA is in use)

These notes are duplicated per thread when a multithreaded process
dumps core.

There are few options I see:

 a) Dump the VFP/NEON state in NT_FPREGSET.
    This could be appended to, or in place of the legacy FPA regs,
    with flags in a header or (struct elf_prstatus).pr_fpvalid
    to describe what was dumped.  Old gdb etc. may read the
    resulting information as random FPA register contents;
    this could perhaps be avoided by always dumping a dummy
    FPA regs structure at the start of this note, though this
    seems wasteful.

    Possibly, gdb may explode if the NT_FPREGSET note is larger
    then expected.  I've not investigated this.

 b) Dump the VFP/NEON regs in a note of type NT_PRXFPREG.
    This avoids defining a new note type; however, this note type
    is really for x86 -- so overloading it in this way may just
    be nonsensical / confusing.

 c) Create a new note type specially for this, and dump the
    VFP/NEON regs in there.  This is closest to the model followed
    by ptrace, where PTRACE_GETREGS, PTRACE_GETFPREGS and
    PTRAGE_GETVFPREGS are all distinct.


Going for (c) seems sanest to me, and also means that old gdb
will just ignore the new data; this is probably what we want.

Comments are welcome.

Cheers
---Dave

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-03-25 13:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-24 14:18 RFC: ARM: Support for VFP/NEON registers in coredumps Dave Martin
2011-03-24 14:48 ` Mikael Pettersson
2011-03-24 14:57 ` Ulrich Weigand
2011-03-24 16:11   ` Dave Martin
2011-03-24 16:40     ` Ulrich Weigand
2011-03-24 16:52       ` Dave Martin
2011-03-24 18:11         ` Ulrich Weigand
2011-03-25 11:57           ` Dave Martin
2011-03-25 13:11             ` Ulrich Weigand
2011-03-25 13:30               ` Dave Martin
2011-03-25 13:40                 ` Ulrich Weigand
2011-03-25 13:51                   ` Dave Martin

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 NNTP newsgroup(s).