From eb93cee2a22cde812ccd6b9bd418d36185c058f5 Mon Sep 17 00:00:00 2001 From: comex Date: Sun, 8 Feb 2015 23:45:24 -0500 Subject: Refactor disassembly so x86 works, and add x86 transform-dis. This patch is a monolithic mess, because I was too lazy to do the refactor first (that would require some stash fun, since I wasn't actually sure before doing x86 transform-dis what would be needed). Anyway, the resulting code should be cleaner - less duplication. This breaks ARM/ARM64. --- lib/hook-functions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/hook-functions.c') diff --git a/lib/hook-functions.c b/lib/hook-functions.c index e0516cb..953683b 100644 --- a/lib/hook-functions.c +++ b/lib/hook-functions.c @@ -5,7 +5,7 @@ #include "transform-dis.h" #include "execmem.h" #include "stop-other-threads.h" -#include TARGET_JUMP_PATCH_HDR +#include stringify(TARGET_DIR/jump-patch.h) struct hook_internal { int offset_by_pcdiff[MAX_JUMP_PATCH_SIZE + 1]; @@ -168,7 +168,7 @@ int substitute_hook_functions(const struct substitute_function_hook *hooks, &hi->trampoline_page, arch))) goto end; - uintptr_t pc_patch_end = pc_patch_start + patch_size; + uint_tptr pc_patch_end = pc_patch_start + patch_size; /* Generate the rewritten start of the function for the outro * trampoline (complaining if any bad instructions are found) * (on arm64, this modifies regs_possibly_written, which is used by the -- cgit v1.2.3