diff --git a/NEWS.md b/NEWS.md index 3c666f50..169456a4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +Red Panda C++ Version 0.12.6 + - fix: heartbeat for gdb server async command shouldn't disable actions + Red Panda C++ Version 0.12.5 - fix: compile error in linux - fix: can't receive gdb async output for commands diff --git a/RedPandaIDE/debugger.cpp b/RedPandaIDE/debugger.cpp index 07b7e817..5dfefb86 100644 --- a/RedPandaIDE/debugger.cpp +++ b/RedPandaIDE/debugger.cpp @@ -930,23 +930,25 @@ void DebugReader::runNextCmd() { QMutexLocker locker(&mCmdQueueMutex); - PDebugCommand lastCmd = mCurrentCmd; if (mCurrentCmd) { + DebugCommandSource commandSource = mCurrentCmd->source; mCurrentCmd=nullptr; - emit cmdFinished(); + if (commandSource!=DebugCommandSource::HeartBeat) + emit cmdFinished(); } if (mCmdQueue.isEmpty()) { if (pSettings->debugger().useGDBServer() && mInferiorRunning && !mAsyncUpdated) { mAsyncUpdated = true; - QTimer::singleShot(1000,this,&DebugReader::asyncUpdate); + QTimer::singleShot(50,this,&DebugReader::asyncUpdate); } return; } PDebugCommand pCmd = mCmdQueue.dequeue(); mCmdRunning = true; - mCurrentCmd = pCmd; - emit cmdStarted(); + mCurrentCmd = pCmd; + if (pCmd->source!=DebugCommandSource::HeartBeat) + emit cmdStarted(); QByteArray s; QByteArray params; @@ -1241,7 +1243,7 @@ void DebugReader::asyncUpdate() { QMutexLocker locker(&mCmdQueueMutex); if (mCmdQueue.isEmpty()) - postCommand("-var-update"," --all-values *",DebugCommandSource::Other); + postCommand("-var-update"," --all-values *",DebugCommandSource::HeartBeat); mAsyncUpdated = false; } diff --git a/RedPandaIDE/debugger.h b/RedPandaIDE/debugger.h index 18e6080c..6e164834 100644 --- a/RedPandaIDE/debugger.h +++ b/RedPandaIDE/debugger.h @@ -34,6 +34,7 @@ enum class DebugCommandSource { Console, + HeartBeat, Other };