Mem hook should return a bool
This commit is contained in:
@@ -538,7 +538,7 @@ static void test_riscv64_mmio_map(void)
|
||||
}
|
||||
|
||||
|
||||
static void test_riscv_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_riscv_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_x5 = 0x0;
|
||||
@@ -551,6 +551,8 @@ static void test_riscv_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_riscv_correct_address_in_small_jump_hook(void)
|
||||
@@ -579,7 +581,7 @@ static void test_riscv_correct_address_in_small_jump_hook(void)
|
||||
OK(uc_close(uc));
|
||||
}
|
||||
|
||||
static void test_riscv_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_riscv_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_x5 = 0x0;
|
||||
@@ -592,6 +594,8 @@ static void test_riscv_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_riscv_correct_address_in_long_jump_hook(void)
|
||||
|
||||
Reference in New Issue
Block a user