- fix: Cpu info window is auto openned, when debug using gdb-server.

This commit is contained in:
Roy Qu 2023-03-08 18:31:47 +08:00
parent 64eca05f7f
commit 139a6d14c0
1 changed files with 8 additions and 3 deletions

View File

@ -1198,9 +1198,13 @@ void DebugReader::processExecAsyncRecord(const QByteArray &line)
}
}
runInferiorStoppedHook();
if (reason.isEmpty() && mCurrentFunc == "_start" && mCurrentFile.isEmpty()) {
//gdb-server connected, just ignore it
return;
if (reason.isEmpty()) {
QMutexLocker locker(&mCmdQueueMutex);
foreach (const PDebugCommand& cmd, mCmdQueue) {
//gdb-server connected, just ignore it
if (cmd->command=="-exec-continue")
return;
}
}
if (mCurrentCmd && mCurrentCmd->source == DebugCommandSource::Console)
emit inferiorStopped(mCurrentFile, mCurrentLine, false);
@ -1303,6 +1307,7 @@ void DebugReader::processDebugOutput(const QByteArray& debugOutput)
void DebugReader::runInferiorStoppedHook()
{
QMutexLocker locker(&mCmdQueueMutex);
foreach (const PDebugCommand& cmd, mInferiorStoppedHookCommands) {
mCmdQueue.push_front(cmd);
}