Also check cpu->stopped
This commit is contained in:
parent
be2f092179
commit
994813a0e5
@ -1520,7 +1520,7 @@ load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi,
|
|||||||
mr = find_memory_region(uc, paddr);
|
mr = find_memory_region(uc, paddr);
|
||||||
if (mr == NULL) {
|
if (mr == NULL) {
|
||||||
uc->invalid_error = UC_ERR_MAP;
|
uc->invalid_error = UC_ERR_MAP;
|
||||||
if (uc->nested_level > 0) {
|
if (uc->nested_level > 0 && !uc->cpu->stopped) {
|
||||||
cpu_exit(uc->cpu);
|
cpu_exit(uc->cpu);
|
||||||
// XXX(@lazymio): We have to exit early so that the target register won't be overwritten
|
// XXX(@lazymio): We have to exit early so that the target register won't be overwritten
|
||||||
// because qemu might generate tcg code like:
|
// because qemu might generate tcg code like:
|
||||||
@ -1534,7 +1534,7 @@ load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi,
|
|||||||
uc->invalid_addr = paddr;
|
uc->invalid_addr = paddr;
|
||||||
uc->invalid_error = error_code;
|
uc->invalid_error = error_code;
|
||||||
// printf("***** Invalid fetch (unmapped memory) at " TARGET_FMT_lx "\n", addr);
|
// printf("***** Invalid fetch (unmapped memory) at " TARGET_FMT_lx "\n", addr);
|
||||||
if (uc->nested_level > 0) {
|
if (uc->nested_level > 0 && !uc->cpu->stopped) {
|
||||||
cpu_exit(uc->cpu);
|
cpu_exit(uc->cpu);
|
||||||
// See comments above
|
// See comments above
|
||||||
cpu_loop_exit(uc->cpu);
|
cpu_loop_exit(uc->cpu);
|
||||||
@ -1592,7 +1592,7 @@ load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi,
|
|||||||
uc->invalid_addr = paddr;
|
uc->invalid_addr = paddr;
|
||||||
uc->invalid_error = UC_ERR_READ_PROT;
|
uc->invalid_error = UC_ERR_READ_PROT;
|
||||||
// printf("***** Invalid memory read (non-readable) at " TARGET_FMT_lx "\n", addr);
|
// printf("***** Invalid memory read (non-readable) at " TARGET_FMT_lx "\n", addr);
|
||||||
if (uc->nested_level > 0) {
|
if (uc->nested_level > 0 && !uc->cpu->stopped) {
|
||||||
cpu_exit(uc->cpu);
|
cpu_exit(uc->cpu);
|
||||||
// See comments above
|
// See comments above
|
||||||
cpu_loop_exit(uc->cpu);
|
cpu_loop_exit(uc->cpu);
|
||||||
@ -1624,7 +1624,7 @@ load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi,
|
|||||||
uc->invalid_addr = paddr;
|
uc->invalid_addr = paddr;
|
||||||
uc->invalid_error = UC_ERR_FETCH_PROT;
|
uc->invalid_error = UC_ERR_FETCH_PROT;
|
||||||
// printf("***** Invalid fetch (non-executable) at " TARGET_FMT_lx "\n", addr);
|
// printf("***** Invalid fetch (non-executable) at " TARGET_FMT_lx "\n", addr);
|
||||||
if (uc->nested_level > 0) {
|
if (uc->nested_level > 0 && !uc->cpu->stopped) {
|
||||||
cpu_exit(uc->cpu);
|
cpu_exit(uc->cpu);
|
||||||
// See comments above
|
// See comments above
|
||||||
cpu_loop_exit(uc->cpu);
|
cpu_loop_exit(uc->cpu);
|
||||||
|
Loading…
Reference in New Issue
Block a user