base: Don't wait for an inactive CPU for remote GDB.
When connecting to a thread, the remote GDB stub will try to wait for an instruction boundary before proceeding. Since the CPU the thread context is attached to may be inactive, it may not get around to reaching an instruction boundary, and the event may not happen for an indefinite period of time. Instead, assume that inactive CPUs are already at instruction boundaries, and trigger the event manually. Change-Id: I9a67a49f9a52bdf9b1f0b88a1d173aa2bdfb5a16 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44612 Reviewed-by: Gabe Black <gabe.black@gmail.com> Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -790,9 +790,16 @@ BaseRemoteGDB::removeHardBreak(Addr addr, size_t len)
|
||||
void
|
||||
BaseRemoteGDB::scheduleInstCommitEvent(Event *ev, int delta)
|
||||
{
|
||||
// Here "ticks" aren't simulator ticks which measure time, they're
|
||||
// instructions committed by the CPU.
|
||||
tc->scheduleInstCountEvent(ev, tc->getCurrentInstCount() + delta);
|
||||
if (delta == 0 && tc->status() != ThreadContext::Active) {
|
||||
// If delta is zero, we're just trying to wait for an instruction
|
||||
// boundary. If the CPU is not active, assume we're already at a
|
||||
// boundary without waiting for the CPU to eventually wake up.
|
||||
ev->process();
|
||||
} else {
|
||||
// Here "ticks" aren't simulator ticks which measure time, they're
|
||||
// instructions committed by the CPU.
|
||||
tc->scheduleInstCountEvent(ev, tc->getCurrentInstCount() + delta);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user