aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/ltrace/ltrace/add_ppc64le.patch
blob: dff61b15022bb0b4dc320815d5000e0bbd8d38c6 (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
--- a/sysdeps/linux-gnu/ppc/ptrace.h
+++ b/sysdeps/linux-gnu/ppc/ptrace.h
@@ -18,4 +18,5 @@
  * 02110-1301 USA
  */
 
+#include <asm/ptrace.h>
 #include <sys/ptrace.h>
--- a/sysdeps/linux-gnu/ppc/regs.c
+++ b/sysdeps/linux-gnu/ppc/regs.c
@@ -23,11 +23,14 @@
 
 #include "config.h"
 
+#include <string.h>
 #include <sys/types.h>
 #include <sys/ptrace.h>
 #include <asm/ptrace.h>
 #include <errno.h>
+#ifdef HAVE_ERROR_H
 #include <error.h>
+#endif
 
 #include "proc.h"
 #include "common.h"
@@ -49,8 +52,11 @@ get_instruction_pointer(struct process *
 void
 set_instruction_pointer(struct process *proc, void *addr)
 {
-	if (ptrace(PTRACE_POKEUSER, proc->pid, sizeof(long)*PT_NIP, addr) != 0)
-		error(0, errno, "set_instruction_pointer");
+	if (ptrace(PTRACE_POKEUSER, proc->pid, sizeof(long)*PT_NIP, addr) != 0){
+		report_global_error("%s: set_instruction_pointer",
+			strerror(errno));
+		exit(1);
+	}
 }
 
 void *