diff options
author | comex | 2015-02-03 02:52:51 -0500 |
---|---|---|
committer | comex | 2015-02-03 02:52:51 -0500 |
commit | c6c8f4abdabd58f9210e5e06c64a6fc36dbc709c (patch) | |
tree | bfa2b8577a9e9e5b99c967be0ae1722ce68d6df1 /lib/transform-dis.c | |
parent | whoops, don't mean to always jump to thumb mode (diff) | |
download | substitute-c6c8f4abdabd58f9210e5e06c64a6fc36dbc709c.tar.gz |
fix ARM64 too, theoretically
Diffstat (limited to 'lib/transform-dis.c')
-rw-r--r-- | lib/transform-dis.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/transform-dis.c b/lib/transform-dis.c index 3210333..867a981 100644 --- a/lib/transform-dis.c +++ b/lib/transform-dis.c @@ -76,14 +76,14 @@ int transform_dis_main(const void *restrict code_ptr, void **restrict rewritten_ptr_ptr, uintptr_t pc_patch_start, uintptr_t *pc_patch_end_p, - struct arch_dis_ctx initial_arch_ctx, + struct arch_dis_ctx *arch_ctx_p, int *offset_by_pcdiff) { struct transform_dis_ctx ctx; memset(&ctx, 0, sizeof(ctx)); ctx.pc_patch_start = pc_patch_start; ctx.pc_patch_end = *pc_patch_end_p; ctx.pc = pc_patch_start; - ctx.arch = initial_arch_ctx; + ctx.arch = *arch_ctx_p; /* data is written to rewritten both by this function directly and, in case * additional scaffolding is needed, by arch-specific transform_dis_* */ ctx.rewritten_ptr_ptr = rewritten_ptr_ptr; @@ -127,6 +127,7 @@ int transform_dis_main(const void *restrict code_ptr, (int) (*rewritten_ptr_ptr - rewritten_start); } *pc_patch_end_p = ctx.pc; + *arch_ctx_p = ctx.arch; return SUBSTITUTE_OK; } |