summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
authorAlexey Brodkin <abrodkin@synopsys.com>2015-03-26 14:25:37 +0530
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2015-03-27 00:08:47 +0100
commit24946289317ea23bb0d1814cca0a499a905f7d6f (patch)
tree4a9a7dba528a4f119f00ef53cffcdf46b6f2cc34 /libc/sysdeps/linux
parentd3c60fc490d714d7610a91555cec67952409b189 (diff)
ARC: don't hard-code ELF_NGREG
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> [updated changelog] Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux')
-rwxr-xr-xlibc/sysdeps/linux/arc/sys/procfs.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/libc/sysdeps/linux/arc/sys/procfs.h b/libc/sysdeps/linux/arc/sys/procfs.h
index a9e375b33..a47430340 100755
--- a/libc/sysdeps/linux/arc/sys/procfs.h
+++ b/libc/sysdeps/linux/arc/sys/procfs.h
@@ -20,17 +20,14 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/user.h>
+#include <asm/ptrace.h>
__BEGIN_DECLS
/* Type for a general-purpose register. */
typedef unsigned long elf_greg_t;
-/* And the whole bunch of them. We could have used `struct
- user_regs' directly in the typedef, but tradition says that
- the register set is an array, which does have some peculiar
- semantics, so leave it that way. */
-#define ELF_NGREG 40
+#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t))
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
typedef struct { } elf_fpregset_t;