dyninst/dyninst-pokeuser.patch
2013-08-05 12:54:58 -04:00

49 lines
2.2 KiB
Diff

diff -up dyninst/proccontrol/src/linux.C.orig dyninst/proccontrol/src/linux.C
--- dyninst/proccontrol/src/linux.C.orig 2013-06-18 11:34:02.000000000 -0400
+++ dyninst/proccontrol/src/linux.C 2013-08-05 12:16:35.172000000 -0400
@@ -1970,7 +1970,7 @@ bool linux_thread::plat_getRegister(Dyni
const unsigned size = i->second.second;
assert(sizeof(val) >= size);
val = 0;
- unsigned long result = do_ptrace((pt_req) PTRACE_PEEKUSR, lwp, (void *) offset, NULL);
+ unsigned long result = do_ptrace((pt_req) PTRACE_PEEKUSER, lwp, (void *) offset, NULL);
if (errno != 0) {
perr_printf("Error reading registers from %d: %s\n", lwp, strerror(errno));
setLastError(err_internal, "Could not read register from thread");
@@ -2184,11 +2184,11 @@ bool linux_thread::plat_setRegister(Dyni
int result;
if (size == 4) {
uint32_t value = (uint32_t) val;
- result = do_ptrace((pt_req) PTRACE_POKEUSR, lwp, (void *) offset, (void *) value);
+ result = do_ptrace((pt_req) PTRACE_POKEUSER, lwp, (void *) offset, (void *) value);
}
else if (size == 8) {
uint64_t value = (uint64_t) val;
- result = do_ptrace((pt_req) PTRACE_POKEUSR, lwp, (void *) offset, (void *) value);
+ result = do_ptrace((pt_req) PTRACE_POKEUSER, lwp, (void *) offset, (void *) value);
}
else {
assert(0);
diff -up dyninst/proccontrol/src/linux.h.orig dyninst/proccontrol/src/linux.h
--- dyninst/proccontrol/src/linux.h.orig 2013-06-18 11:34:02.000000000 -0400
+++ dyninst/proccontrol/src/linux.h 2013-08-05 12:16:35.173000000 -0400
@@ -47,7 +47,6 @@
#include "common/h/dthread.h"
#include <sys/types.h>
#include <sys/ptrace.h>
-#include <linux/ptrace.h>
typedef enum __ptrace_request pt_req;
diff -up dyninst/stackwalk/src/linux-swk.C.orig dyninst/stackwalk/src/linux-swk.C
--- dyninst/stackwalk/src/linux-swk.C.orig 2013-06-18 11:34:02.000000000 -0400
+++ dyninst/stackwalk/src/linux-swk.C 2013-08-05 12:16:35.175000000 -0400
@@ -73,7 +73,6 @@ using namespace Dyninst::Stackwalker;
// if porting to some linux-like platform that doesn't support
// them.
#include <sys/ptrace.h>
-#include <linux/ptrace.h>
typedef enum __ptrace_request pt_req;
#define cap_ptrace_traceclone
#define cap_ptrace_setoptions