144d143
< using namespace Debug;
251,252d249
< BaseCPU *cpu = gdb->context->getCpuPtr();
< EventQueue *eq = cpu->comInstEventQueue[gdb->context->threadId()];
255,257c252
< // Here "ticks" aren't simulator ticks which measure time, they're
< // instructions committed by the CPU.
< eq->schedule(&gdb->trapEvent, eq->getCurTick());
---
> gdb->scheduleInstCommitEvent(&gdb->trapEvent, 0);
259,260c254
< if (gdb->trapEvent.scheduled())
< eq->deschedule(&gdb->trapEvent);
---
> gdb->descheduleInstCommitEvent(&gdb->trapEvent);
538a533,555
> EventQueue *
> BaseRemoteGDB::getComInstEventQueue()
> {
> BaseCPU *cpu = context->getCpuPtr();
> return cpu->comInstEventQueue[context->threadId()];
> }
>
> void
> BaseRemoteGDB::scheduleInstCommitEvent(Event *ev, int delta)
> {
> EventQueue *eq = getComInstEventQueue();
> // Here "ticks" aren't simulator ticks which measure time, they're
> // instructions committed by the CPU.
> eq->schedule(ev, eq->getCurTick() + delta);
> }
>
> void
> BaseRemoteGDB::descheduleInstCommitEvent(Event *ev)
> {
> if (ev->scheduled())
> getComInstEventQueue()->deschedule(ev);
> }
>