Skip to content

Commit c6646d3

Browse files
committed
Land PR#7 - Fix stack layout on thumb hooks
1 parent d8d0f01 commit c6646d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

instruments/base/hook.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ int hook(struct hook_t *h, int pid, char *libname, char *funcname, void *hook_ar
105105
h->patch = (unsigned int)hook_thumb;
106106
h->orig = addr;
107107
h->jumpt[1] = 0xb4;
108-
h->jumpt[0] = 0x30; // push {r4,r5}
108+
h->jumpt[0] = 0x60; // push {r5,r6}
109109
h->jumpt[3] = 0xa5;
110110
h->jumpt[2] = 0x03; // add r5, pc, #12
111111
h->jumpt[5] = 0x68;

0 commit comments

Comments
 (0)