a32_unicorn: Print code on unicorn error
This commit is contained in:
parent
5a597f415c
commit
fa145ae401
1 changed files with 4 additions and 1 deletions
|
@ -43,7 +43,10 @@ void A32Unicorn<TestEnvironment>::Run() {
|
||||||
// Thumb execution mode requires the LSB to be set to 1.
|
// Thumb execution mode requires the LSB to be set to 1.
|
||||||
constexpr u64 pc_mask = std::is_same_v<TestEnvironment, ArmTestEnv> ? 0 : 1;
|
constexpr u64 pc_mask = std::is_same_v<TestEnvironment, ArmTestEnv> ? 0 : 1;
|
||||||
while (testenv.ticks_left > 0) {
|
while (testenv.ticks_left > 0) {
|
||||||
CHECKED(uc_emu_start(uc, GetPC() | pc_mask, END_ADDRESS, 0, 1));
|
const u32 pc = GetPC() | pc_mask;
|
||||||
|
if (auto cerr_ = uc_emu_start(uc, pc, END_ADDRESS, 0, 1)) {
|
||||||
|
ASSERT_MSG(false, "uc_emu_start failed @ {:08x} (code = {:08x}) with error {} ({})", pc, testenv.MemoryReadCode(pc), cerr_, uc_strerror(cerr_));
|
||||||
|
}
|
||||||
testenv.ticks_left--;
|
testenv.ticks_left--;
|
||||||
if (!testenv.interrupts.empty() || testenv.code_mem_modified_by_guest) {
|
if (!testenv.interrupts.empty() || testenv.code_mem_modified_by_guest) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue