aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc/include
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2013-02-27 05:34:07 -0500
committerVineet Gupta <vgupta@synopsys.com>2013-02-27 09:29:55 -0500
commit5dc99e50d2d66f8ddeb4e20af1908ad99db0cb98 (patch)
tree51fcb29ca657e40422a720ab222056778fe0b858 /arch/arc/include
parent7e0d306c372bf70ff19eb476bc7f7635abe816ea (diff)
ARC: gdbserver using regset interface possibly broken
ptrace regset interface relies on ELF_NGREG for ceiling the size of user request. So any larger request (even if legit) would be clipped. The existing def of ELF_NGREG didn't use user_regs_struct and was technically one placeholder short (stop_pc) - although the current code would still work because pt_regs includes a bunch of extra fields, making ELF_NGREG >= sizeof(struct user_regs_struct)/sizeof(long) But we need to remove this ambiguity, specially since pt_regs should NOT be directly associated with with anything userspace-ish. Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/include')
-rw-r--r--arch/arc/include/asm/elf.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/arc/include/asm/elf.h b/arch/arc/include/asm/elf.h
index 147284ff1f96..4d420055a71b 100644
--- a/arch/arc/include/asm/elf.h
+++ b/arch/arc/include/asm/elf.h
@@ -27,11 +27,7 @@
27typedef unsigned long elf_greg_t; 27typedef unsigned long elf_greg_t;
28typedef unsigned long elf_fpregset_t; 28typedef unsigned long elf_fpregset_t;
29 29
30 30#define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t))
31/* core dump regs is in the order pt_regs, callee_regs, stop_pc (for gdb) */
32#define ELF_NGREG ((sizeof(struct pt_regs) + sizeof(struct callee_regs) \
33 + sizeof(unsigned long)) / sizeof(elf_greg_t))
34
35typedef elf_greg_t elf_gregset_t[ELF_NGREG]; 31typedef elf_greg_t elf_gregset_t[ELF_NGREG];
36 32
37/* 33/*