Skip to contentSkip to conversation

[4160] Fix single stepping wrt pending interrupts

Qemu-devel Aurelien Jarno 1 participant 1 message Apr 4, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 4160

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4160
Author:   aurel32
Date:     2008-04-04 17:16:35 +0000 (Fri, 04 Apr 2008)

Log Message:
-----------
Fix single stepping wrt pending interrupts

(Jason Wessel)

Modified Paths:
--------------
trunk/vl.c

Modified: trunk/vl.c
===================================================================

vl.c +2 -2
@@ -7541,7 +7541,7 @@
                 qemu_time += profile_getclock() - ti;
 #endif
                 next_cpu = env->next_cpu ?: first_cpu;
-                if (event_pending) {
+                if (event_pending && likely(ret != EXCP_DEBUG)) {
                     ret = EXCP_INTERRUPT;
                     event_pending = 0;
                     break;
@@ -7573,7 +7573,7 @@
 		qemu_system_powerdown();
                 ret = EXCP_INTERRUPT;
             }
-            if (ret == EXCP_DEBUG) {
+            if (unlikely(ret == EXCP_DEBUG)) {
                 vm_stop(EXCP_DEBUG);
             }
             /* If all cpus are halted then wait until the next IRQ */