All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Nelson <markn@au1.ibm.com>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] add Altivec/VMX state to coredumps
Date: Wed, 26 Sep 2007 11:22:28 +1000	[thread overview]
Message-ID: <46F9B454.8010004@au1.ibm.com> (raw)
In-Reply-To: <E4CA12E1-888D-4A8B-B687-02F9D2850E1F@kernel.crashing.org>

Kumar Gala wrote:
> 
> On Sep 24, 2007, at 11:03 PM, Mark Nelson wrote:
> 
>> Update dump_task_altivec() (that has so far never been put to use)
>> so that it dumps the Altivec/VMX registers (VR[0] - VR[31], VSCR
>> and VRSAVE) in the same format as the ptrace get_vrregs() and add
>> the appropriate glue typedefs and #defines to
>> include/asm-powerpc/elf.h for it to work.
> 
> Is there some way to tell if the core dump has altivec registers state
> in it?
> 
> I'm wondering how we distinguish a core dump w/altivec state vs one with
> SPE state.
> 
> - k
> 
> 

If the core dump has the Altivec registers saved in there it will have a
note called LINUX as shown below:

$ readelf -n core

Notes at offset 0x000002b4 with length 0x000005c8:
  Owner         Data size       Description
  CORE          0x0000010c      NT_PRSTATUS (prstatus structure)
  CORE          0x00000080      NT_PRPSINFO (prpsinfo structure)
  CORE          0x000000b0      NT_AUXV (auxiliary vector)
  CORE          0x00000108      NT_FPREGSET (floating point registers)
  LINUX         0x00000220      NT_PRXFPREG (user_xfpregs structure)

This mirrors what occurs with the SSE registers on i386 core dumps in
order to keep things as similar as possible.

I can't find any place where dump_spe() is called at the moment, but I
suppose if it were to be hooked up in the future it could cause confusion.
The Altivec register state in the core file is much larger than what
would be dumped by the current dump_spe(), but I'm not sure if that
matters...

There's a patch for GDB that currently reads the contents of these vector
registers from the core file, but it's being held until this patch has
been commented on and/or approved of, so if it comes to it the note name
could be changed to ALTIVEC (or something similar).


Thanks!
Mark.

  parent reply	other threads:[~2007-09-26  1:25 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-25  4:03 [PATCH] add Altivec/VMX state to coredumps Mark Nelson
2007-09-25 12:39 ` Kumar Gala
2007-09-25 18:00   ` Matt Sealey
2007-09-25 22:18     ` Benjamin Herrenschmidt
2007-09-26 11:05       ` Matt Sealey
2007-09-26 13:21         ` Segher Boessenkool
2007-09-26 13:32           ` Kumar Gala
2007-09-26 13:38             ` Segher Boessenkool
2007-09-26 14:00           ` Matt Sealey
2007-09-26  1:22   ` Mark Nelson [this message]
2007-09-26  3:56     ` Kumar Gala
2007-09-26  4:56       ` Mark Nelson
2007-09-26  5:37         ` Kumar Gala
2007-09-26  7:42           ` Geert Uytterhoeven
2007-09-27  2:53             ` Michael Ellerman
2007-09-27  2:48           ` Michael Ellerman
2007-09-27 10:10             ` Kumar Gala
2007-09-27 23:54               ` Michael Ellerman

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=46F9B454.8010004@au1.ibm.com \
    --to=markn@au1.ibm.com \
    --cc=galak@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.