diff options
author | Tejun Heo <tj@kernel.org> | 2009-02-09 16:17:39 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-10 02:41:26 +0300 |
commit | 6cd61c0baa8bce32271226198b46c67a7a05d108 (patch) | |
tree | f4584e1f105c0252f3f5f5cbf7e2e4be1eb5e2ce /include/linux/elfcore.h | |
parent | 92e2d508464b6293ad274fb606f766a458894142 (diff) | |
download | linux-6cd61c0baa8bce32271226198b46c67a7a05d108.tar.xz |
elf: add ELF_CORE_COPY_KERNEL_REGS()
ELF core dump is used for both user land core dump and kernel crash
dump. Depending on architecture, register might need to be accessed
differently for userland and kernel. Allow architectures to define
ELF_CORE_COPY_KERNEL_REGS() and use different operation for kernel
register dump.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/elfcore.h')
-rw-r--r-- | include/linux/elfcore.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/elfcore.h b/include/linux/elfcore.h index 5ca54d77079f..7605c5e9589f 100644 --- a/include/linux/elfcore.h +++ b/include/linux/elfcore.h @@ -111,6 +111,15 @@ static inline void elf_core_copy_regs(elf_gregset_t *elfregs, struct pt_regs *re #endif } +static inline void elf_core_copy_kernel_regs(elf_gregset_t *elfregs, struct pt_regs *regs) +{ +#ifdef ELF_CORE_COPY_KERNEL_REGS + ELF_CORE_COPY_KERNEL_REGS((*elfregs), regs); +#else + elf_core_copy_regs(elfregs, regs); +#endif +} + static inline int elf_core_copy_task_regs(struct task_struct *t, elf_gregset_t* elfregs) { #ifdef ELF_CORE_COPY_TASK_REGS |