- fix: heartbeat for gdb server async command shouldn't disable actions
This commit is contained in:
parent
f4db7fcad0
commit
2319034be4
3
NEWS.md
3
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
|
Red Panda C++ Version 0.12.5
|
||||||
- fix: compile error in linux
|
- fix: compile error in linux
|
||||||
- fix: can't receive gdb async output for commands
|
- fix: can't receive gdb async output for commands
|
||||||
|
|
|
@ -930,23 +930,25 @@ void DebugReader::runNextCmd()
|
||||||
{
|
{
|
||||||
QMutexLocker locker(&mCmdQueueMutex);
|
QMutexLocker locker(&mCmdQueueMutex);
|
||||||
|
|
||||||
PDebugCommand lastCmd = mCurrentCmd;
|
|
||||||
if (mCurrentCmd) {
|
if (mCurrentCmd) {
|
||||||
|
DebugCommandSource commandSource = mCurrentCmd->source;
|
||||||
mCurrentCmd=nullptr;
|
mCurrentCmd=nullptr;
|
||||||
emit cmdFinished();
|
if (commandSource!=DebugCommandSource::HeartBeat)
|
||||||
|
emit cmdFinished();
|
||||||
}
|
}
|
||||||
if (mCmdQueue.isEmpty()) {
|
if (mCmdQueue.isEmpty()) {
|
||||||
if (pSettings->debugger().useGDBServer() && mInferiorRunning && !mAsyncUpdated) {
|
if (pSettings->debugger().useGDBServer() && mInferiorRunning && !mAsyncUpdated) {
|
||||||
mAsyncUpdated = true;
|
mAsyncUpdated = true;
|
||||||
QTimer::singleShot(1000,this,&DebugReader::asyncUpdate);
|
QTimer::singleShot(50,this,&DebugReader::asyncUpdate);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
PDebugCommand pCmd = mCmdQueue.dequeue();
|
PDebugCommand pCmd = mCmdQueue.dequeue();
|
||||||
mCmdRunning = true;
|
mCmdRunning = true;
|
||||||
mCurrentCmd = pCmd;
|
mCurrentCmd = pCmd;
|
||||||
emit cmdStarted();
|
if (pCmd->source!=DebugCommandSource::HeartBeat)
|
||||||
|
emit cmdStarted();
|
||||||
|
|
||||||
QByteArray s;
|
QByteArray s;
|
||||||
QByteArray params;
|
QByteArray params;
|
||||||
|
@ -1241,7 +1243,7 @@ void DebugReader::asyncUpdate()
|
||||||
{
|
{
|
||||||
QMutexLocker locker(&mCmdQueueMutex);
|
QMutexLocker locker(&mCmdQueueMutex);
|
||||||
if (mCmdQueue.isEmpty())
|
if (mCmdQueue.isEmpty())
|
||||||
postCommand("-var-update"," --all-values *",DebugCommandSource::Other);
|
postCommand("-var-update"," --all-values *",DebugCommandSource::HeartBeat);
|
||||||
mAsyncUpdated = false;
|
mAsyncUpdated = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
|
|
||||||
enum class DebugCommandSource {
|
enum class DebugCommandSource {
|
||||||
Console,
|
Console,
|
||||||
|
HeartBeat,
|
||||||
Other
|
Other
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue