OSDN Git Service

ARC: don't hard-code ELF_NGREG
authorAlexey Brodkin <abrodkin@synopsys.com>
Thu, 26 Mar 2015 08:55:37 +0000 (14:25 +0530)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Thu, 26 Mar 2015 23:08:47 +0000 (00:08 +0100)
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>
libc/sysdeps/linux/arc/sys/procfs.h

index a9e375b..a474303 100755 (executable)
 #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;