Commit 7d3bb6fd authored by hjk's avatar hjk

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: default avatarNiels Weber <niels.weber@theqtcompany.com>
parent 7ac99044
......@@ -1999,13 +1999,6 @@ void GdbEngine::continueInferiorInternal()
postCommand("-exec-continue", RunRequest, CB(handleExecuteContinue));
}
void GdbEngine::autoContinueInferior()
{
resetLocation();
continueInferiorInternal();
showStatusMessage(tr("Continuing after temporary stop..."), 1000);
}
void GdbEngine::continueInferior()
{
CHECK_STATE(InferiorStopOk);
......@@ -2166,7 +2159,6 @@ void GdbEngine::executeRunToLine(const ContextData &data)
{
CHECK_STATE(InferiorStopOk);
setTokenBarrier();
resetLocation();
notifyInferiorRunRequested();
showStatusMessage(tr("Run to line %1 requested...").arg(data.lineNumber), 5000);
#if 1
......@@ -2191,7 +2183,6 @@ void GdbEngine::executeRunToFunction(const QString &functionName)
{
CHECK_STATE(InferiorStopOk);
setTokenBarrier();
resetLocation();
postCommand("-break-insert -t " + functionName.toLatin1());
showStatusMessage(tr("Run to function %1 requested...").arg(functionName), 5000);
continueInferiorInternal();
......
......@@ -251,7 +251,6 @@ private: ////////// Inferior Management //////////
protected:
void continueInferiorInternal();
void autoContinueInferior();
void continueInferior() override;
void interruptInferior() override;
virtual void interruptInferior2() {}
......
......@@ -408,42 +408,36 @@ void LldbEngine::interruptInferior()
void LldbEngine::executeStep()
{
resetLocation();
notifyInferiorRunRequested();
runCommand("executeStep");
}
void LldbEngine::executeStepI()
{
resetLocation();
notifyInferiorRunRequested();
runCommand("executeStepI");
}
void LldbEngine::executeStepOut()
{
resetLocation();
notifyInferiorRunRequested();
runCommand("executeStepOut");
}
void LldbEngine::executeNext()
{
resetLocation();
notifyInferiorRunRequested();
runCommand("executeNext");
}
void LldbEngine::executeNextI()
{
resetLocation();
notifyInferiorRunRequested();
runCommand("executeNextI");
}
void LldbEngine::continueInferior()
{
resetLocation();
notifyInferiorRunRequested();
DebuggerCommand cmd("continueInferior");
cmd.callback = [this](const DebuggerResponse &response) {
......@@ -487,7 +481,6 @@ void LldbEngine::handleResponse(const QByteArray &response)
void LldbEngine::executeRunToLine(const ContextData &data)
{
resetLocation();
notifyInferiorRunRequested();
DebuggerCommand cmd("executeRunToLocation");
cmd.arg("file", data.fileName);
......@@ -498,7 +491,6 @@ void LldbEngine::executeRunToLine(const ContextData &data)
void LldbEngine::executeRunToFunction(const QString &functionName)
{
resetLocation();
notifyInferiorRunRequested();
DebuggerCommand cmd("executeRunToFunction");
cmd.arg("function", functionName);
......@@ -507,7 +499,6 @@ void LldbEngine::executeRunToFunction(const QString &functionName)
void LldbEngine::executeJumpToLine(const ContextData &data)
{
resetLocation();
DebuggerCommand cmd("executeJumpToLocation");
cmd.arg("file", data.fileName);
cmd.arg("line", data.lineNumber);
......
......@@ -180,7 +180,6 @@ void PdbEngine::interruptInferior()
void PdbEngine::executeStep()
{
resetLocation();
notifyInferiorRunRequested();
notifyInferiorRunOk();
postDirectCommand("step");
......@@ -188,7 +187,6 @@ void PdbEngine::executeStep()
void PdbEngine::executeStepI()
{
resetLocation();
notifyInferiorRunRequested();
notifyInferiorRunOk();
postDirectCommand("step");
......@@ -196,7 +194,6 @@ void PdbEngine::executeStepI()
void PdbEngine::executeStepOut()
{
resetLocation();
notifyInferiorRunRequested();
notifyInferiorRunOk();
postDirectCommand("return");
......@@ -204,7 +201,6 @@ void PdbEngine::executeStepOut()
void PdbEngine::executeNext()
{
resetLocation();
notifyInferiorRunRequested();
notifyInferiorRunOk();
postDirectCommand("next");
......@@ -212,7 +208,6 @@ void PdbEngine::executeNext()
void PdbEngine::executeNextI()
{
resetLocation();
notifyInferiorRunRequested();
notifyInferiorRunOk();
postDirectCommand("next");
......@@ -220,7 +215,6 @@ void PdbEngine::executeNextI()
void PdbEngine::continueInferior()
{
resetLocation();
notifyInferiorRunRequested();
notifyInferiorRunOk();
// Callback will be triggered e.g. when breakpoint is hit.
......
......@@ -719,7 +719,6 @@ void QmlEngine::executeRunToLine(const ContextData &data)
{
QTC_ASSERT(state() == InferiorStopOk, qDebug() << state());
showStatusMessage(tr("Run to line %1 (%2) requested...").arg(data.lineNumber).arg(data.fileName), 5000);
resetLocation();
ContextData modifiedData = data;
quint32 line = data.lineNumber;
quint32 column;
......
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