Debugger: Mimic parts of lldbbridge in gdbbridge

Make code more similar for later sharing.

Change-Id: I260e10ba1b613dfcebc45bb1a268b6fcebbde353
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
hjk
2016-12-15 18:28:58 +01:00
parent a61b6dfc57
commit 5c2a7b57e4
2 changed files with 17 additions and 12 deletions

View File

@@ -574,6 +574,9 @@ void GdbEngine::handleResponse(const QString &buff)
m_pendingLogStreamOutput.clear();
m_pendingConsoleStreamOutput.clear();
if (response.data.data().isEmpty())
response.data.fromString(response.consoleStreamOutput);
handleResultRecord(&response);
break;
}
@@ -1706,8 +1709,7 @@ void GdbEngine::handlePythonSetup(const DebuggerResponse &response)
{
CHECK_STATE(EngineSetupRequested);
if (response.resultClass == ResultDone) {
GdbMi data;
data.fromStringMultiple(response.consoleStreamOutput);
GdbMi data = response.data;
watchHandler()->addDumpers(data["dumpers"]);
m_pythonVersion = data["python"].toInt();
if (m_pythonVersion < 20700) {
@@ -3243,12 +3245,11 @@ void GdbEngine::handleStackListFrames(const DebuggerResponse &response, bool isF
return;
}
GdbMi frames = response.data["stack"]; // C++
if (!frames.isValid() || frames.childCount() == 0) { // Mixed.
GdbMi mixed;
mixed.fromStringMultiple(response.consoleStreamOutput);
frames = mixed["frames"];
}
GdbMi stack = response.data["stack"]; // C++
//if (!frames.isValid() || frames.childCount() == 0) // Mixed.
GdbMi frames = stack["frames"];
if (!frames.isValid())
isFull = true;
stackHandler()->setFramesAndCurrentIndex(frames, isFull);
activateFrame(stackHandler()->currentIndex());