Skip to contentSkip to conversation

[4432] Debugger single step without interrupts (Jason Wessel).

Qemu-devel Edgar E. Iglesias 4 participants 4 messages May 12, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 4432

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4432
Author:   edgar_igl
Date:     2008-05-12 07:44:23 +0000 (Mon, 12 May 2008)

Log Message:
-----------
Debugger single step without interrupts (Jason Wessel).

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

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

vl.c +2 -0
@@ -7032,6 +7032,7 @@
     qemu_aio_poll();
 
     if (vm_running) {
+        if (!(cur_cpu->singlestep_enabled & SSTEP_NOTIMER))
         qemu_run_timers(&active_timers[QEMU_TIMER_VIRTUAL],
                         qemu_get_clock(vm_clock));
         /* run dma transfers, if any */
@@ -7039,6 +7040,7 @@
     }
 
     /* real time timers */
+    if (!(cur_cpu->singlestep_enabled & SSTEP_NOTIMER))
     qemu_run_timers(&active_timers[QEMU_TIMER_REALTIME],
                     qemu_get_clock(rt_clock));
 
#1 lore raw

I see no reason why the real time timers should be stopped while single stepping. These timers have no relation with the emulation.

BTW, it seems that some devices incorrectly use the real time timers...

Regards,

Fabrice.

Quoted 38 lines · Edgar E. Iglesias

Revision: 4432

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4432
Author:   edgar_igl
Date:     2008-05-12 07:44:23 +0000 (Mon, 12 May 2008)

Log Message:
-----------
Debugger single step without interrupts (Jason Wessel).

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

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

vl.c +2 -0
@@ -7032,6 +7032,7 @@
     qemu_aio_poll();
 
     if (vm_running) {
+        if (!(cur_cpu->singlestep_enabled & SSTEP_NOTIMER))
         qemu_run_timers(&active_timers[QEMU_TIMER_VIRTUAL],
                         qemu_get_clock(vm_clock));
         /* run dma transfers, if any */
@@ -7039,6 +7040,7 @@
     }
 
     /* real time timers */
+    if (!(cur_cpu->singlestep_enabled & SSTEP_NOTIMER))
     qemu_run_timers(&active_timers[QEMU_TIMER_REALTIME],
                     qemu_get_clock(rt_clock));
 
#2 lore raw
Quoted 2 lines · Fabrice Bellard

I see no reason why the real time timers should be stopped while single stepping. These timers have no relation with the emulation.

Thanks for noticing.

Quoted 1 line

BTW, it seems that some devices incorrectly use the real time timers...

OK, not sure if thats the reason for disabling them. Jason?
I tried to keep them on with the etrax machine and the sstep works equally well.

Best regards

Signature · 14 lines
Edgar E. Iglesias
Axis Communications AB

Index: vl.c
===================================================================
--- vl.c	(revision 4432)
+++ vl.c	(working copy)
@@ -7040,7 +7040,6 @@
     }
 
     /* real time timers */
-    if (!(cur_cpu->singlestep_enabled & SSTEP_NOTIMER))
     qemu_run_timers(&active_timers[QEMU_TIMER_REALTIME],
                     qemu_get_clock(rt_clock));
#3 lore raw
Quoted 6 lines · Edgar E. Iglesias
Quoted 3 lines · Fabrice Bellard

I see no reason why the real time timers should be stopped while single stepping. These timers have no relation with the emulation.

Quoted 9 lines

Thanks for noticing.

Quoted 2 lines

BTW, it seems that some devices incorrectly use the real time timers...

OK, not sure if thats the reason for disabling them. Jason?
I tried to keep them on with the etrax machine and the sstep works equally well.

There is no particular need to disable the real time timers at this point. I had exchanged mail with Fabrice over a year ago on this one. The patch you applied for the irq stepping fixes had never been formally re-submitted by myself or had that piece cleaned up. I had posted some old patches in response because someone asked about them on the mailing list.

Unless you beat me too it, I will gladly submit a patch to clean up stepping after the gdb monitor cleanup. :-)

Jason.