summaryrefslogtreecommitdiff
path: root/src/plugins/debugger
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2015-09-02 12:47:47 +0200
committerhjk <hjk@theqtcompany.com>2015-09-02 13:38:47 +0000
commit1535fccffd5768c6102e67f1ec78355459e9e89a (patch)
treea753abbc3195dde8c0990ef941a017f61054a6a9 /src/plugins/debugger
parent33fc9e209d28362159f279365d6de7eb6305a444 (diff)
downloadqt-creator-1535fccffd5768c6102e67f1ec78355459e9e89a.tar.gz
Debugger: Replace unneeded requests for updates in PdbEngine
... by more direct flushing on the dumper side. Change-Id: I53d91e564bb948e3c934242fec4f23f36ee8c10e Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r--src/plugins/debugger/pdb/pdbengine.cpp23
-rw-r--r--src/plugins/debugger/pdb/pdbengine.h1
2 files changed, 15 insertions, 9 deletions
diff --git a/src/plugins/debugger/pdb/pdbengine.cpp b/src/plugins/debugger/pdb/pdbengine.cpp
index f6a2435737..d458d995af 100644
--- a/src/plugins/debugger/pdb/pdbengine.cpp
+++ b/src/plugins/debugger/pdb/pdbengine.cpp
@@ -179,7 +179,6 @@ void PdbEngine::interruptInferior()
{
QString error;
interruptProcess(m_proc.processId(), GdbEngineType, &error);
- notifyInferiorStopOk();
}
void PdbEngine::executeStep()
@@ -188,7 +187,6 @@ void PdbEngine::executeStep()
notifyInferiorRunRequested();
notifyInferiorRunOk();
postDirectCommand("step");
- updateAll();
}
void PdbEngine::executeStepI()
@@ -197,7 +195,6 @@ void PdbEngine::executeStepI()
notifyInferiorRunRequested();
notifyInferiorRunOk();
postDirectCommand("step");
- updateAll();
}
void PdbEngine::executeStepOut()
@@ -206,7 +203,6 @@ void PdbEngine::executeStepOut()
notifyInferiorRunRequested();
notifyInferiorRunOk();
postDirectCommand("return");
- updateAll();
}
void PdbEngine::executeNext()
@@ -215,7 +211,6 @@ void PdbEngine::executeNext()
notifyInferiorRunRequested();
notifyInferiorRunOk();
postDirectCommand("next");
- updateAll();
}
void PdbEngine::executeNextI()
@@ -224,7 +219,6 @@ void PdbEngine::executeNextI()
notifyInferiorRunRequested();
notifyInferiorRunOk();
postDirectCommand("next");
- updateAll();
}
void PdbEngine::continueInferior()
@@ -234,7 +228,6 @@ void PdbEngine::continueInferior()
notifyInferiorRunOk();
// Callback will be triggered e.g. when breakpoint is hit.
postDirectCommand("continue");
- updateAll();
}
void PdbEngine::executeRunToLine(const ContextData &data)
@@ -348,6 +341,17 @@ void PdbEngine::requestModuleSymbols(const QString &moduleName)
runCommand(cmd);
}
+void PdbEngine::refreshState(const GdbMi &reportedState)
+{
+ QByteArray newState = reportedState.data();
+ if (newState == "stopped") {
+ notifyInferiorSpontaneousStop();
+ updateAll();
+ } else if (newState == "inferiorexited") {
+ notifyInferiorExited();
+ }
+}
+
void PdbEngine::refreshLocation(const GdbMi &reportedLocation)
{
StackFrame frame;
@@ -476,13 +480,12 @@ void PdbEngine::handleOutput(const QByteArray &data)
void PdbEngine::handleOutput2(const QByteArray &data)
{
- QByteArray lineContext;
foreach (QByteArray line, data.split('\n')) {
GdbMi item;
item.fromString(line);
- showMessage(_("LINE: " + line));
+ showMessage(_(line), LogOutput);
if (line.startsWith("stack={")) {
refreshStack(item);
@@ -494,6 +497,8 @@ void PdbEngine::handleOutput2(const QByteArray &data)
refreshSymbols(item);
} else if (line.startsWith("location={")) {
refreshLocation(item);
+ } else if (line.startsWith("state=")) {
+ refreshState(item);
} else if (line.startsWith("Breakpoint")) {
int pos1 = line.indexOf(" at ");
QTC_ASSERT(pos1 != -1, continue);
diff --git a/src/plugins/debugger/pdb/pdbengine.h b/src/plugins/debugger/pdb/pdbengine.h
index 7100305e89..cd27f93524 100644
--- a/src/plugins/debugger/pdb/pdbengine.h
+++ b/src/plugins/debugger/pdb/pdbengine.h
@@ -105,6 +105,7 @@ private:
void refreshStack(const GdbMi &stack);
void refreshLocals(const GdbMi &vars);
void refreshModules(const GdbMi &modules);
+ void refreshState(const GdbMi &reportedState);
void refreshSymbols(const GdbMi &symbols);
QString errorMessage(QProcess::ProcessError error) const;