patches/ltrace/0.5.3/120-debian-ltrace_0.5.3-2.patch
changeset 1685 ecccce88fc71
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/ltrace/0.5.3/120-debian-ltrace_0.5.3-2.patch	Sun Jan 03 16:46:58 2010 +0100
     1.3 @@ -0,0 +1,78 @@
     1.4 +Debian patch courtesy of the Debian ltrace maintainer Juan Cespedes <cespedes@debian.org>
     1.5 +
     1.6 +--- ltrace-0.5.3.orig/sysdeps/linux-gnu/breakpoint.c
     1.7 ++++ ltrace-0.5.3/sysdeps/linux-gnu/breakpoint.c
     1.8 +@@ -6,8 +6,6 @@
     1.9 + #include "common.h"
    1.10 + #include "arch.h"
    1.11 + 
    1.12 +-static unsigned char break_insn[] = BREAKPOINT_VALUE;
    1.13 +-
    1.14 + #ifdef ARCH_HAVE_ENABLE_BREAKPOINT
    1.15 + extern void arch_enable_breakpoint(pid_t, Breakpoint *);
    1.16 + void
    1.17 +@@ -20,6 +18,9 @@
    1.18 + 	arch_enable_breakpoint(pid, sbp);
    1.19 + }
    1.20 + #else
    1.21 ++
    1.22 ++static unsigned char break_insn[] = BREAKPOINT_VALUE;
    1.23 ++
    1.24 + void
    1.25 + enable_breakpoint(pid_t pid, Breakpoint *sbp) {
    1.26 + 	unsigned int i, j;
    1.27 +--- ltrace-0.5.3.orig/sysdeps/linux-gnu/arm/breakpoint.c
    1.28 ++++ ltrace-0.5.3/sysdeps/linux-gnu/arm/breakpoint.c
    1.29 +@@ -24,10 +24,7 @@
    1.30 + 
    1.31 + #include <sys/ptrace.h>
    1.32 + #include "config.h"
    1.33 +-#include "arch.h"
    1.34 +-#include "options.h"
    1.35 +-#include "output.h"
    1.36 +-#include "debug.h"
    1.37 ++#include "common.h"
    1.38 + 
    1.39 + void
    1.40 + arch_enable_breakpoint(pid_t pid, Breakpoint *sbp) {
    1.41 +@@ -59,8 +56,6 @@
    1.42 + void
    1.43 + arch_disable_breakpoint(pid_t pid, const Breakpoint *sbp) {
    1.44 + 	unsigned int i, j;
    1.45 +-	const unsigned char break_insn[] = BREAKPOINT_VALUE;
    1.46 +-	const unsigned char thumb_break_insn[] = THUMB_BREAKPOINT_VALUE;
    1.47 + 
    1.48 + 	debug(1, "arch_disable_breakpoint(%d,%p)", pid, sbp->addr);
    1.49 + 
    1.50 +--- ltrace-0.5.3.orig/sysdeps/linux-gnu/ia64/plt.c
    1.51 ++++ ltrace-0.5.3/sysdeps/linux-gnu/ia64/plt.c
    1.52 +@@ -1,4 +1,5 @@
    1.53 + #include <gelf.h>
    1.54 ++#include <sys/ptrace.h>
    1.55 + #include "common.h"
    1.56 + 
    1.57 + /* A bundle is 128 bits */
    1.58 +--- ltrace-0.5.3.orig/sysdeps/linux-gnu/ia64/breakpoint.c
    1.59 ++++ ltrace-0.5.3/sysdeps/linux-gnu/ia64/breakpoint.c
    1.60 +@@ -6,10 +6,7 @@
    1.61 + 
    1.62 + #include <sys/ptrace.h>
    1.63 + #include <string.h>
    1.64 +-#include "arch.h"
    1.65 +-#include "options.h"
    1.66 +-#include "output.h"
    1.67 +-#include "debug.h"
    1.68 ++#include "common.h"
    1.69 + 
    1.70 + static long long
    1.71 + extract_bit_field(char *bundle, int from, int len) {
    1.72 +--- ltrace-0.5.3.orig/sysdeps/linux-gnu/ia64/regs.c
    1.73 ++++ ltrace-0.5.3/sysdeps/linux-gnu/ia64/regs.c
    1.74 +@@ -7,7 +7,6 @@
    1.75 + #include <asm/rse.h>
    1.76 + 
    1.77 + #include <stddef.h>
    1.78 +-#include "debug.h"
    1.79 + #include "common.h"
    1.80 + 
    1.81 + void *