summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch69
-rw-r--r--meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb2
2 files changed, 71 insertions, 0 deletions
diff --git a/meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch b/meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch
new file mode 100644
index 000000000..09c4394c2
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python-pyflame-1.6.6/0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch
@@ -0,0 +1,69 @@
1From 2ef124e235a47dd4742813cf80e11a89cf4f02f8 Mon Sep 17 00:00:00 2001
2From: Andrew Jeffery <andrew@aj.id.au>
3Date: Thu, 3 May 2018 12:35:31 +0930
4Subject: [PATCH] ptrace: Abstract over user_regs_struct name, which differs on
5 ARM32
6
7Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
8---
9 src/ptrace.cc | 6 +++---
10 src/ptrace.h | 10 ++++++++--
11 2 files changed, 11 insertions(+), 5 deletions(-)
12
13diff --git a/src/ptrace.cc b/src/ptrace.cc
14index 485f58e4d82e..610fabb3b8e8 100644
15--- a/src/ptrace.cc
16+++ b/src/ptrace.cc
17@@ -122,8 +122,8 @@ void PtraceInterrupt(pid_t pid) {
18 DoWait(pid);
19 }
20
21-struct user_regs_struct PtraceGetRegs(pid_t pid) {
22- struct user_regs_struct regs;
23+user_regs_struct PtraceGetRegs(pid_t pid) {
24+ user_regs_struct regs;
25 if (ptrace(PTRACE_GETREGS, pid, 0, &regs)) {
26 std::ostringstream ss;
27 ss << "Failed to PTRACE_GETREGS: " << strerror(errno);
28@@ -132,7 +132,7 @@ struct user_regs_struct PtraceGetRegs(pid_t pid) {
29 return regs;
30 }
31
32-void PtraceSetRegs(pid_t pid, struct user_regs_struct regs) {
33+void PtraceSetRegs(pid_t pid, user_regs_struct regs) {
34 if (ptrace(PTRACE_SETREGS, pid, 0, &regs)) {
35 std::ostringstream ss;
36 ss << "Failed to PTRACE_SETREGS: " << strerror(errno);
37diff --git a/src/ptrace.h b/src/ptrace.h
38index 7083be1c4dfd..d6af8bf9f83a 100644
39--- a/src/ptrace.h
40+++ b/src/ptrace.h
41@@ -23,6 +23,12 @@
42
43 #include "./config.h"
44
45+#if defined(__arm__)
46+typedef struct user_regs user_regs_struct;
47+#else
48+typedef struct user_regs_struct user_regs_struct;
49+#endif
50+
51 namespace pyflame {
52
53 int DoWait(pid_t pid, int options = 0);
54@@ -39,10 +45,10 @@ void PtraceSeize(pid_t pid);
55 void PtraceInterrupt(pid_t pid);
56
57 // get regs from a process
58-struct user_regs_struct PtraceGetRegs(pid_t pid);
59+user_regs_struct PtraceGetRegs(pid_t pid);
60
61 // set regs in a process
62-void PtraceSetRegs(pid_t pid, struct user_regs_struct regs);
63+void PtraceSetRegs(pid_t pid, user_regs_struct regs);
64
65 // poke a long word into an address
66 void PtracePoke(pid_t pid, unsigned long addr, long data);
67--
682.14.1
69
diff --git a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
index 96f03305f..7a6d3b099 100644
--- a/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
+++ b/meta-python/recipes-devtools/python/python-pyflame_1.6.6.bb
@@ -1 +1,3 @@
1require python-pyflame.inc 1require python-pyflame.inc
2
3SRC_URI += "file://0001-ptrace-Abstract-over-user_regs_struct-name-which-dif.patch"