Commit 95b010094c80d4af21b9b6fc1cfb4499bcd697d2
1 parent
41a00ab1
Fix single stepping wrt pending interrupts
(Jason Wessel) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4160 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
2 additions
and
2 deletions
vl.c
... | ... | @@ -7541,7 +7541,7 @@ static int main_loop(void) |
7541 | 7541 | qemu_time += profile_getclock() - ti; |
7542 | 7542 | #endif |
7543 | 7543 | next_cpu = env->next_cpu ?: first_cpu; |
7544 | - if (event_pending) { | |
7544 | + if (event_pending && likely(ret != EXCP_DEBUG)) { | |
7545 | 7545 | ret = EXCP_INTERRUPT; |
7546 | 7546 | event_pending = 0; |
7547 | 7547 | break; |
... | ... | @@ -7573,7 +7573,7 @@ static int main_loop(void) |
7573 | 7573 | qemu_system_powerdown(); |
7574 | 7574 | ret = EXCP_INTERRUPT; |
7575 | 7575 | } |
7576 | - if (ret == EXCP_DEBUG) { | |
7576 | + if (unlikely(ret == EXCP_DEBUG)) { | |
7577 | 7577 | vm_stop(EXCP_DEBUG); |
7578 | 7578 | } |
7579 | 7579 | /* If all cpus are halted then wait until the next IRQ */ | ... | ... |