diff options
author | Guo Ren <ren_guo@c-sky.com> | 2018-12-30 18:06:53 +0100 |
---|---|---|
committer | Guo Ren <ren_guo@c-sky.com> | 2018-12-31 03:59:19 +0100 |
commit | 2054f4af19575d9d2a43bcefa48d2e64f10a25de (patch) | |
tree | e4f39a975ef26b825895a6237cffe22313752fd9 /arch/csky | |
parent | csky: fixup abiv2 mmap(... O_SYNC) failed. (diff) | |
download | linux-2054f4af19575d9d2a43bcefa48d2e64f10a25de.tar.xz linux-2054f4af19575d9d2a43bcefa48d2e64f10a25de.zip |
csky: bugfix gdb coredump error.
In gdb/bfd elf32-csky.c, csky_elf_grok_prstatus() use fixed size of
elf_prstatus. It's 148 for abiv1 and 220 for abiv2, the size is enough
for coredump and no need full sizeof(struct pt_regs).
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Reported-by: Lu Baoquan <lu.baoquan@intellif.com>
Reported-by: Liu Mao <liu.mao@intellif.com>
Diffstat (limited to 'arch/csky')
-rw-r--r-- | arch/csky/include/asm/elf.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/csky/include/asm/elf.h b/arch/csky/include/asm/elf.h index 48b5366568ab..d6dbc00e3533 100644 --- a/arch/csky/include/asm/elf.h +++ b/arch/csky/include/asm/elf.h @@ -31,7 +31,12 @@ typedef unsigned long elf_greg_t; typedef struct user_fp elf_fpregset_t; -#define ELF_NGREG (sizeof(struct pt_regs) / sizeof(elf_greg_t)) +/* + * In gdb/bfd elf32-csky.c, csky_elf_grok_prstatus() use fixed size of + * elf_prstatus. It's 148 for abiv1 and 220 for abiv2, the size is enough + * for coredump and no need full sizeof(struct pt_regs). + */ +#define ELF_NGREG ((sizeof(struct pt_regs) / sizeof(elf_greg_t)) - 2) typedef elf_greg_t elf_gregset_t[ELF_NGREG]; |