Commit d4fcdcca authored by hjk's avatar hjk
Browse files

debugger: keep track of current gdb thread

parent 30d06289
......@@ -1410,6 +1410,7 @@ void GdbEngine::handleStop1(const GdbMi &data)
const QByteArray threadId = data.findChild("thread-id").data();
const BreakpointId id = breakHandler()->findBreakpointByNumber(bpNumber);
showStatusMessage(msgBreakpointTriggered(id, bpNumber, _(threadId)));
m_currentThread = threadId;
} else {
QString reasontr = msgStopped(_(reason));
if (reason == "signal-received"
......@@ -2984,8 +2985,12 @@ void GdbEngine::activateFrame(int frameIndex)
// Otherwise the lines below would need to get triggered
// after a response to this -stack-select-frame here.
handler->setCurrentIndex(frameIndex);
postCommand("-stack-select-frame " + QByteArray::number(frameIndex),
Discardable, CB(handleStackSelectFrame));
QByteArray cmd = "-stack-select-frame";
//if (!m_currentThread.isEmpty())
// cmd += " --thread " + m_currentThread;
cmd += ' ';
cmd += QByteArray::number(frameIndex);
postCommand(cmd, Discardable, CB(handleStackSelectFrame));
gotoLocation(stackHandler()->currentFrame());
updateLocals();
reloadRegisters();
......
......@@ -548,6 +548,7 @@ private: ////////// View & Data Stuff //////////
// HACK:
StackFrame m_targetFrame;
QByteArray m_currentThread;
};
} // namespace Internal
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment