diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc index 2c74aa0592..da3f113f38 100644 --- a/src/base/remote_gdb.cc +++ b/src/base/remote_gdb.cc @@ -555,6 +555,12 @@ BaseRemoteGDB::trap(ContextID id, int signum,const std::string& stopReason) return; if (tc->contextId() != id) { + + //prevent thread switch when single stepping + if (singleStepEvent.scheduled()){ + return; + } + DPRINTF(GDBMisc, "Finishing thread switch"); if (!selectThreadContext(id)) return; }