diff options
author | Roland McGrath <roland@redhat.com> | 2008-01-02 20:05:48 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-02-07 04:40:23 -0500 |
commit | 24f1a849614ba1805e26a05da7cc8c6bd67490ea (patch) | |
tree | 95266f926b1f6a29959565b3d683baeacaa25049 | |
parent | 0deef2c7ab9dcf82f6ad26fc2fca358cd56c9cb9 (diff) |
[POWERPC] Add SPE registers to core dumps
This makes the SPE register data appear in ELF core dumps, using the
new n_type value NT_PPC_SPE (0x101). This new note type is not used
by any consumers of core files yet, but support can be added. I don't
even have any hardware with SPE capabilities, so I've never seen such
a note. But this demonstrates how simple it is to export register
information in core dumps when the user_regset style is used for the
low-level code.
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/powerpc/kernel/ptrace.c | 2 | ||||
-rw-r--r-- | include/linux/elf.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c index 7571c2e2d991..7673e9865733 100644 --- a/arch/powerpc/kernel/ptrace.c +++ b/arch/powerpc/kernel/ptrace.c | |||
@@ -581,7 +581,7 @@ static const struct user_regset compat_regsets[] = { | |||
581 | #endif | 581 | #endif |
582 | #ifdef CONFIG_SPE | 582 | #ifdef CONFIG_SPE |
583 | [REGSET_SPE] = { | 583 | [REGSET_SPE] = { |
584 | .n = 35, | 584 | .core_note_type = NT_PPC_SPE, .n = 35, |
585 | .size = sizeof(u32), .align = sizeof(u32), | 585 | .size = sizeof(u32), .align = sizeof(u32), |
586 | .active = evr_active, .get = evr_get, .set = evr_set | 586 | .active = evr_active, .get = evr_get, .set = evr_set |
587 | }, | 587 | }, |
diff --git a/include/linux/elf.h b/include/linux/elf.h index 7ceb24d87c1a..30eb6fbd5323 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
@@ -355,6 +355,7 @@ typedef struct elf64_shdr { | |||
355 | #define NT_AUXV 6 | 355 | #define NT_AUXV 6 |
356 | #define NT_PRXFPREG 0x46e62b7f /* copied from gdb5.1/include/elf/common.h */ | 356 | #define NT_PRXFPREG 0x46e62b7f /* copied from gdb5.1/include/elf/common.h */ |
357 | #define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */ | 357 | #define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */ |
358 | #define NT_PPC_SPE 0x101 /* PowerPC SPE/EVR registers */ | ||
358 | #define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */ | 359 | #define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */ |
359 | 360 | ||
360 | 361 | ||