aboutsummaryrefslogtreecommitdiff
path: root/lib/darwin/execmem.c
diff options
context:
space:
mode:
authorcomex2015-02-24 20:39:14 -0500
committercomex2015-02-24 20:39:14 -0500
commit24eddaa8240137328a0522eccf741e7868a2ee58 (patch)
treeef7915f83133d966ff8986d3ea41c640832d3d96 /lib/darwin/execmem.c
parentAdd transform-dis-cases-arm64.S and fix a serious bug thus discovered. (diff)
downloadsubstitute-24eddaa8240137328a0522eccf741e7868a2ee58.tar.gz
fix arm64/armv7 ish
Diffstat (limited to 'lib/darwin/execmem.c')
-rw-r--r--lib/darwin/execmem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/darwin/execmem.c b/lib/darwin/execmem.c
index 0155b1f..b142aff 100644
--- a/lib/darwin/execmem.c
+++ b/lib/darwin/execmem.c
@@ -115,7 +115,7 @@ static bool apply_one_pcp_with_state(native_thread_state *state,
uintptr_t old = *pcp;
#ifdef __arm__
/* thumb */
- if (state.cpsr & 0x20)
+ if (state->__cpsr & 0x20)
old |= 1;
#endif
uintptr_t new = callback(ctx, *pcp);
@@ -123,7 +123,7 @@ static bool apply_one_pcp_with_state(native_thread_state *state,
*pcp = new;
#ifdef __arm__
*pcp &= ~1;
- state.cpsr = (state.cpsr & ~0x20) | ((new & 1) * 0x20);
+ state->__cpsr = (state->__cpsr & ~0x20) | ((new & 1) * 0x20);
#endif
return changed;
}