Debugger: Remove some unneeded calls to resetLocation()

Since resetLocation() is called when the repective actions are
triggered immediately before the engine's executeFoo() are called
there is no need to call them in executeFoo() again.

Also, remove the unused autoContinueInferior(); function.

Change-Id: I8d2ec419c0da6efa388ce1ed317f31d24654897f
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
This commit is contained in:
hjk
2015-09-11 16:18:57 +02:00
parent 7ac99044e8
commit 7d3bb6fdee
5 changed files with 0 additions and 26 deletions

View File

@@ -1999,13 +1999,6 @@ void GdbEngine::continueInferiorInternal()
postCommand("-exec-continue", RunRequest, CB(handleExecuteContinue)); postCommand("-exec-continue", RunRequest, CB(handleExecuteContinue));
} }
void GdbEngine::autoContinueInferior()
{
resetLocation();
continueInferiorInternal();
showStatusMessage(tr("Continuing after temporary stop..."), 1000);
}
void GdbEngine::continueInferior() void GdbEngine::continueInferior()
{ {
CHECK_STATE(InferiorStopOk); CHECK_STATE(InferiorStopOk);
@@ -2166,7 +2159,6 @@ void GdbEngine::executeRunToLine(const ContextData &data)
{ {
CHECK_STATE(InferiorStopOk); CHECK_STATE(InferiorStopOk);
setTokenBarrier(); setTokenBarrier();
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
showStatusMessage(tr("Run to line %1 requested...").arg(data.lineNumber), 5000); showStatusMessage(tr("Run to line %1 requested...").arg(data.lineNumber), 5000);
#if 1 #if 1
@@ -2191,7 +2183,6 @@ void GdbEngine::executeRunToFunction(const QString &functionName)
{ {
CHECK_STATE(InferiorStopOk); CHECK_STATE(InferiorStopOk);
setTokenBarrier(); setTokenBarrier();
resetLocation();
postCommand("-break-insert -t " + functionName.toLatin1()); postCommand("-break-insert -t " + functionName.toLatin1());
showStatusMessage(tr("Run to function %1 requested...").arg(functionName), 5000); showStatusMessage(tr("Run to function %1 requested...").arg(functionName), 5000);
continueInferiorInternal(); continueInferiorInternal();

View File

@@ -251,7 +251,6 @@ private: ////////// Inferior Management //////////
protected: protected:
void continueInferiorInternal(); void continueInferiorInternal();
void autoContinueInferior();
void continueInferior() override; void continueInferior() override;
void interruptInferior() override; void interruptInferior() override;
virtual void interruptInferior2() {} virtual void interruptInferior2() {}

View File

@@ -408,42 +408,36 @@ void LldbEngine::interruptInferior()
void LldbEngine::executeStep() void LldbEngine::executeStep()
{ {
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
runCommand("executeStep"); runCommand("executeStep");
} }
void LldbEngine::executeStepI() void LldbEngine::executeStepI()
{ {
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
runCommand("executeStepI"); runCommand("executeStepI");
} }
void LldbEngine::executeStepOut() void LldbEngine::executeStepOut()
{ {
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
runCommand("executeStepOut"); runCommand("executeStepOut");
} }
void LldbEngine::executeNext() void LldbEngine::executeNext()
{ {
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
runCommand("executeNext"); runCommand("executeNext");
} }
void LldbEngine::executeNextI() void LldbEngine::executeNextI()
{ {
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
runCommand("executeNextI"); runCommand("executeNextI");
} }
void LldbEngine::continueInferior() void LldbEngine::continueInferior()
{ {
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
DebuggerCommand cmd("continueInferior"); DebuggerCommand cmd("continueInferior");
cmd.callback = [this](const DebuggerResponse &response) { cmd.callback = [this](const DebuggerResponse &response) {
@@ -487,7 +481,6 @@ void LldbEngine::handleResponse(const QByteArray &response)
void LldbEngine::executeRunToLine(const ContextData &data) void LldbEngine::executeRunToLine(const ContextData &data)
{ {
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
DebuggerCommand cmd("executeRunToLocation"); DebuggerCommand cmd("executeRunToLocation");
cmd.arg("file", data.fileName); cmd.arg("file", data.fileName);
@@ -498,7 +491,6 @@ void LldbEngine::executeRunToLine(const ContextData &data)
void LldbEngine::executeRunToFunction(const QString &functionName) void LldbEngine::executeRunToFunction(const QString &functionName)
{ {
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
DebuggerCommand cmd("executeRunToFunction"); DebuggerCommand cmd("executeRunToFunction");
cmd.arg("function", functionName); cmd.arg("function", functionName);
@@ -507,7 +499,6 @@ void LldbEngine::executeRunToFunction(const QString &functionName)
void LldbEngine::executeJumpToLine(const ContextData &data) void LldbEngine::executeJumpToLine(const ContextData &data)
{ {
resetLocation();
DebuggerCommand cmd("executeJumpToLocation"); DebuggerCommand cmd("executeJumpToLocation");
cmd.arg("file", data.fileName); cmd.arg("file", data.fileName);
cmd.arg("line", data.lineNumber); cmd.arg("line", data.lineNumber);

View File

@@ -180,7 +180,6 @@ void PdbEngine::interruptInferior()
void PdbEngine::executeStep() void PdbEngine::executeStep()
{ {
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
notifyInferiorRunOk(); notifyInferiorRunOk();
postDirectCommand("step"); postDirectCommand("step");
@@ -188,7 +187,6 @@ void PdbEngine::executeStep()
void PdbEngine::executeStepI() void PdbEngine::executeStepI()
{ {
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
notifyInferiorRunOk(); notifyInferiorRunOk();
postDirectCommand("step"); postDirectCommand("step");
@@ -196,7 +194,6 @@ void PdbEngine::executeStepI()
void PdbEngine::executeStepOut() void PdbEngine::executeStepOut()
{ {
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
notifyInferiorRunOk(); notifyInferiorRunOk();
postDirectCommand("return"); postDirectCommand("return");
@@ -204,7 +201,6 @@ void PdbEngine::executeStepOut()
void PdbEngine::executeNext() void PdbEngine::executeNext()
{ {
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
notifyInferiorRunOk(); notifyInferiorRunOk();
postDirectCommand("next"); postDirectCommand("next");
@@ -212,7 +208,6 @@ void PdbEngine::executeNext()
void PdbEngine::executeNextI() void PdbEngine::executeNextI()
{ {
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
notifyInferiorRunOk(); notifyInferiorRunOk();
postDirectCommand("next"); postDirectCommand("next");
@@ -220,7 +215,6 @@ void PdbEngine::executeNextI()
void PdbEngine::continueInferior() void PdbEngine::continueInferior()
{ {
resetLocation();
notifyInferiorRunRequested(); notifyInferiorRunRequested();
notifyInferiorRunOk(); notifyInferiorRunOk();
// Callback will be triggered e.g. when breakpoint is hit. // Callback will be triggered e.g. when breakpoint is hit.

View File

@@ -719,7 +719,6 @@ void QmlEngine::executeRunToLine(const ContextData &data)
{ {
QTC_ASSERT(state() == InferiorStopOk, qDebug() << state()); QTC_ASSERT(state() == InferiorStopOk, qDebug() << state());
showStatusMessage(tr("Run to line %1 (%2) requested...").arg(data.lineNumber).arg(data.fileName), 5000); showStatusMessage(tr("Run to line %1 (%2) requested...").arg(data.lineNumber).arg(data.fileName), 5000);
resetLocation();
ContextData modifiedData = data; ContextData modifiedData = data;
quint32 line = data.lineNumber; quint32 line = data.lineNumber;
quint32 column; quint32 column;