diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp index a3c3b055f9f..1b2f7b27ca0 100644 --- a/src/plugins/debugger/debuggerengine.cpp +++ b/src/plugins/debugger/debuggerengine.cpp @@ -567,6 +567,8 @@ void DebuggerEngine::resetLocation() void DebuggerEngine::gotoLocation(const Location &loc) { + d->resetLocation(); + if (debuggerCore()->boolSetting(OperateByInstruction) || !loc.hasDebugInfo()) { d->m_disassemblerAgent.setLocation(loc); return; @@ -575,7 +577,6 @@ void DebuggerEngine::gotoLocation(const Location &loc) //if (m_shuttingDown) // return; - d->resetLocation(); const QString file = loc.fileName(); const int line = loc.lineNumber();