summaryrefslogtreecommitdiff
path: root/package/strace/patches/patch-defs_h
blob: c5687b4574b1ccf0306c42039e01955616014b64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
--- strace-4.8.orig/defs.h	2013-05-14 16:10:42.000000000 +0200
+++ strace-4.8/defs.h	2014-01-15 12:10:01.000000000 +0100
@@ -37,6 +37,28 @@
 # endif
 #endif
 
+#ifdef ARM
+struct pt_regs { long uregs[18]; };
+#define ARM_cpsr uregs[16]
+#define ARM_pc uregs[15]
+#define ARM_lr uregs[14]
+#define ARM_sp uregs[13]
+#define ARM_ip uregs[12]
+#define ARM_fp uregs[11]
+#define ARM_r10 uregs[10]
+#define ARM_r9 uregs[9]
+#define ARM_r8 uregs[8]
+#define ARM_r7 uregs[7]
+#define ARM_r6 uregs[6]
+#define ARM_r5 uregs[5]
+#define ARM_r4 uregs[4]
+#define ARM_r3 uregs[3]
+#define ARM_r2 uregs[2]
+#define ARM_r1 uregs[1]
+#define ARM_r0 uregs[0]
+#define ARM_ORIG_r0 uregs[17]
+#endif
+
 #ifdef MIPS
 # include <sgidefs.h>
 # if _MIPS_SIM == _MIPS_SIM_ABI64
@@ -155,14 +177,14 @@ extern char *stpcpy(char *dst, const cha
     || defined(METAG) \
     || defined(TILE) \
     || defined(XTENSA) \
-    ) && defined(__GLIBC__)
+    ) && defined(__linux__)
 # include <sys/ptrace.h>
 #else
 /* Work around awkward prototype in ptrace.h. */
 # define ptrace xptrace
 # include <sys/ptrace.h>
 # undef ptrace
-# ifdef POWERPC
+# if defined(ARM)
 #  define __KERNEL__
 #  include <asm/ptrace.h>
 #  undef __KERNEL__
@@ -222,11 +244,6 @@ extern long ptrace(int, int, char *, lon
 # define PTRACE_EVENT_EXIT	6
 #endif
 
-#if !defined(__GLIBC__)
-# define PTRACE_PEEKUSER PTRACE_PEEKUSR
-# define PTRACE_POKEUSER PTRACE_POKEUSR
-#endif
-
 #if USE_SEIZE
 # undef PTRACE_SEIZE
 # define PTRACE_SEIZE		0x4206