jocke@1685
|
1 |
Debian patch courtesy of the Debian ltrace maintainer Juan Cespedes <cespedes@debian.org>
|
jocke@1685
|
2 |
|
jocke@1685
|
3 |
--- ltrace-0.5.3.orig/sysdeps/linux-gnu/breakpoint.c
|
jocke@1685
|
4 |
+++ ltrace-0.5.3/sysdeps/linux-gnu/breakpoint.c
|
jocke@1685
|
5 |
@@ -6,8 +6,6 @@
|
jocke@1685
|
6 |
#include "common.h"
|
jocke@1685
|
7 |
#include "arch.h"
|
jocke@1685
|
8 |
|
jocke@1685
|
9 |
-static unsigned char break_insn[] = BREAKPOINT_VALUE;
|
jocke@1685
|
10 |
-
|
jocke@1685
|
11 |
#ifdef ARCH_HAVE_ENABLE_BREAKPOINT
|
jocke@1685
|
12 |
extern void arch_enable_breakpoint(pid_t, Breakpoint *);
|
jocke@1685
|
13 |
void
|
jocke@1685
|
14 |
@@ -20,6 +18,9 @@
|
jocke@1685
|
15 |
arch_enable_breakpoint(pid, sbp);
|
jocke@1685
|
16 |
}
|
jocke@1685
|
17 |
#else
|
jocke@1685
|
18 |
+
|
jocke@1685
|
19 |
+static unsigned char break_insn[] = BREAKPOINT_VALUE;
|
jocke@1685
|
20 |
+
|
jocke@1685
|
21 |
void
|
jocke@1685
|
22 |
enable_breakpoint(pid_t pid, Breakpoint *sbp) {
|
jocke@1685
|
23 |
unsigned int i, j;
|
jocke@1685
|
24 |
--- ltrace-0.5.3.orig/sysdeps/linux-gnu/arm/breakpoint.c
|
jocke@1685
|
25 |
+++ ltrace-0.5.3/sysdeps/linux-gnu/arm/breakpoint.c
|
jocke@1685
|
26 |
@@ -24,10 +24,7 @@
|
jocke@1685
|
27 |
|
jocke@1685
|
28 |
#include <sys/ptrace.h>
|
jocke@1685
|
29 |
#include "config.h"
|
jocke@1685
|
30 |
-#include "arch.h"
|
jocke@1685
|
31 |
-#include "options.h"
|
jocke@1685
|
32 |
-#include "output.h"
|
jocke@1685
|
33 |
-#include "debug.h"
|
jocke@1685
|
34 |
+#include "common.h"
|
jocke@1685
|
35 |
|
jocke@1685
|
36 |
void
|
jocke@1685
|
37 |
arch_enable_breakpoint(pid_t pid, Breakpoint *sbp) {
|
jocke@1685
|
38 |
@@ -59,8 +56,6 @@
|
jocke@1685
|
39 |
void
|
jocke@1685
|
40 |
arch_disable_breakpoint(pid_t pid, const Breakpoint *sbp) {
|
jocke@1685
|
41 |
unsigned int i, j;
|
jocke@1685
|
42 |
- const unsigned char break_insn[] = BREAKPOINT_VALUE;
|
jocke@1685
|
43 |
- const unsigned char thumb_break_insn[] = THUMB_BREAKPOINT_VALUE;
|
jocke@1685
|
44 |
|
jocke@1685
|
45 |
debug(1, "arch_disable_breakpoint(%d,%p)", pid, sbp->addr);
|
jocke@1685
|
46 |
|
jocke@1685
|
47 |
--- ltrace-0.5.3.orig/sysdeps/linux-gnu/ia64/plt.c
|
jocke@1685
|
48 |
+++ ltrace-0.5.3/sysdeps/linux-gnu/ia64/plt.c
|
jocke@1685
|
49 |
@@ -1,4 +1,5 @@
|
jocke@1685
|
50 |
#include <gelf.h>
|
jocke@1685
|
51 |
+#include <sys/ptrace.h>
|
jocke@1685
|
52 |
#include "common.h"
|
jocke@1685
|
53 |
|
jocke@1685
|
54 |
/* A bundle is 128 bits */
|
jocke@1685
|
55 |
--- ltrace-0.5.3.orig/sysdeps/linux-gnu/ia64/breakpoint.c
|
jocke@1685
|
56 |
+++ ltrace-0.5.3/sysdeps/linux-gnu/ia64/breakpoint.c
|
jocke@1685
|
57 |
@@ -6,10 +6,7 @@
|
jocke@1685
|
58 |
|
jocke@1685
|
59 |
#include <sys/ptrace.h>
|
jocke@1685
|
60 |
#include <string.h>
|
jocke@1685
|
61 |
-#include "arch.h"
|
jocke@1685
|
62 |
-#include "options.h"
|
jocke@1685
|
63 |
-#include "output.h"
|
jocke@1685
|
64 |
-#include "debug.h"
|
jocke@1685
|
65 |
+#include "common.h"
|
jocke@1685
|
66 |
|
jocke@1685
|
67 |
static long long
|
jocke@1685
|
68 |
extract_bit_field(char *bundle, int from, int len) {
|
jocke@1685
|
69 |
--- ltrace-0.5.3.orig/sysdeps/linux-gnu/ia64/regs.c
|
jocke@1685
|
70 |
+++ ltrace-0.5.3/sysdeps/linux-gnu/ia64/regs.c
|
jocke@1685
|
71 |
@@ -7,7 +7,6 @@
|
jocke@1685
|
72 |
#include <asm/rse.h>
|
jocke@1685
|
73 |
|
jocke@1685
|
74 |
#include <stddef.h>
|
jocke@1685
|
75 |
-#include "debug.h"
|
jocke@1685
|
76 |
#include "common.h"
|
jocke@1685
|
77 |
|
jocke@1685
|
78 |
void *
|