Mem hook should return a bool

This commit is contained in:
2022-05-20 13:31:54 +02:00
parent 5d37e21db5
commit dae48aecee
3 changed files with 21 additions and 7 deletions

View File

@@ -196,7 +196,7 @@ static void test_arm64_mrs_hook(void)
}
static void test_arm64_correct_address_in_small_jump_hook_callback(uc_engine *uc, int type, uint64_t address, int size, int64_t value, void *user_data)
static bool test_arm64_correct_address_in_small_jump_hook_callback(uc_engine *uc, int type, uint64_t address, int size, int64_t value, void *user_data)
{
// Check registers
uint64_t r_x0 = 0x0;
@@ -209,6 +209,8 @@ static void test_arm64_correct_address_in_small_jump_hook_callback(uc_engine *uc
// Check address
// printf("%lx\n", address);
TEST_CHECK(address == 0x7F00);
return false;
}
static void test_arm64_correct_address_in_small_jump_hook(void)
@@ -237,7 +239,7 @@ static void test_arm64_correct_address_in_small_jump_hook(void)
OK(uc_close(uc));
}
static void test_arm64_correct_address_in_long_jump_hook_callback(uc_engine *uc, int type, uint64_t address, int size, int64_t value, void *user_data)
static bool test_arm64_correct_address_in_long_jump_hook_callback(uc_engine *uc, int type, uint64_t address, int size, int64_t value, void *user_data)
{
// Check registers
uint64_t r_x0 = 0x0;
@@ -250,6 +252,8 @@ static void test_arm64_correct_address_in_long_jump_hook_callback(uc_engine *uc,
// Check address
// printf("%lx\n", address);
TEST_CHECK(address == 0x7FFFFFFFFFFFFF00);
return false;
}
static void test_arm64_correct_address_in_long_jump_hook(void)