From d2d7585db553ca69830f7eadcc0f8a5c7feaf6d3 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 12 Aug 2021 17:42:11 +0100 Subject: Changes to remove hard-coding of MAP_SIZE_POW2 when inline instrumentation is disabled --- frida_mode/src/instrument/instrument.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'frida_mode/src') diff --git a/frida_mode/src/instrument/instrument.c b/frida_mode/src/instrument/instrument.c index 67aafa5a..fddff19a 100644 --- a/frida_mode/src/instrument/instrument.c +++ b/frida_mode/src/instrument/instrument.c @@ -116,8 +116,8 @@ __attribute__((hot)) static void on_basic_block(GumCpuContext *context, } - instrument_previous_pc = - ((current_pc & (MAP_SIZE - 1) >> 1)) | ((current_pc & 0x1) << 15); + instrument_previous_pc = ((current_pc & (MAP_SIZE - 1) >> 1)) | + ((current_pc & 0x1) << (MAP_SIZE_POW2 - 1)); } -- cgit 1.4.1