Skip to content

Commit 7f6dcc7

Browse files
committed
Test the pc is correctly sync-ed for arm64
1 parent ab56572 commit 7f6dcc7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/unit/test_arm64.c

+3
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,9 @@ static void test_arm64_correct_address_in_long_jump_hook(void)
299299
static void test_arm64_block_sync_pc_cb(uc_engine *uc, uint64_t addr,
300300
uint32_t size, void *data)
301301
{
302+
uint64_t pc;
303+
OK(uc_reg_read(uc, UC_ARM64_REG_PC, (void*)&pc));
304+
TEST_CHECK(pc == addr);
302305
uint64_t val = code_start;
303306
bool first = *(bool *)data;
304307
if (first) {

0 commit comments

Comments
 (0)