1a2
> * Copyright 2014 Google, Inc.
131a133
> #include "cpu/base.hh"
249,251c251,260
< if (revent & POLLIN)
< gdb->trap(SIGILL);
< else if (revent & POLLNVAL)
---
> BaseCPU *cpu = gdb->context->getCpuPtr();
> EventQueue *eq = cpu->comInstEventQueue[gdb->context->threadId()];
> if (revent & POLLIN) {
> gdb->trapEvent.type(SIGILL);
> // Here "ticks" aren't simulator ticks which measure time, they're
> // instructions committed by the CPU.
> eq->schedule(&gdb->trapEvent, eq->getCurTick());
> } else if (revent & POLLNVAL) {
> if (gdb->trapEvent.scheduled())
> eq->deschedule(&gdb->trapEvent);
252a262
> }
254a265,270
> void
> BaseRemoteGDB::TrapEvent::process()
> {
> gdb->trap(_type);
> }
>
256c272
< : event(NULL), listener(NULL), number(-1), fd(-1),
---
> : event(NULL), trapEvent(this), listener(NULL), number(-1), fd(-1),