Commit 0caf52f6 authored by hjk's avatar hjk
Browse files

debugger: remove recently introduced endless loop in resetLocation()

parent c0ac7aaf
...@@ -92,6 +92,8 @@ public: ...@@ -92,6 +92,8 @@ public:
bool setMarker = false) = 0; bool setMarker = false) = 0;
virtual void resetLocation() = 0; virtual void resetLocation() = 0;
virtual void removeLocationMark() = 0;
virtual void readSettings() = 0; virtual void readSettings() = 0;
virtual void writeSettings() const = 0; virtual void writeSettings() const = 0;
......
...@@ -516,7 +516,7 @@ void DebuggerEngine::resetLocation() ...@@ -516,7 +516,7 @@ void DebuggerEngine::resetLocation()
{ {
d->m_disassemblerViewAgent.resetLocation(); d->m_disassemblerViewAgent.resetLocation();
d->m_stackHandler.setCurrentIndex(-1); d->m_stackHandler.setCurrentIndex(-1);
debuggerCore()->resetLocation(); debuggerCore()->removeLocationMark();
} }
void DebuggerEngine::gotoLocation(const QString &fileName, int lineNumber, bool setMarker) void DebuggerEngine::gotoLocation(const QString &fileName, int lineNumber, bool setMarker)
...@@ -531,7 +531,7 @@ void DebuggerEngine::gotoLocation(const StackFrame &frame, bool setMarker) ...@@ -531,7 +531,7 @@ void DebuggerEngine::gotoLocation(const StackFrame &frame, bool setMarker)
{ {
if (theDebuggerBoolSetting(OperateByInstruction) || !frame.isUsable()) { if (theDebuggerBoolSetting(OperateByInstruction) || !frame.isUsable()) {
if (setMarker) if (setMarker)
debuggerCore()->resetLocation(); resetLocation();
d->m_disassemblerViewAgent.setFrame(frame); d->m_disassemblerViewAgent.setFrame(frame);
} else { } else {
debuggerCore()->gotoLocation(frame.file, frame.line, setMarker); debuggerCore()->gotoLocation(frame.file, frame.line, setMarker);
......
...@@ -1201,6 +1201,7 @@ public slots: ...@@ -1201,6 +1201,7 @@ public slots:
} }
void resetLocation(); void resetLocation();
void removeLocationMark();
QVariant sessionValue(const QString &name); QVariant sessionValue(const QString &name);
void setSessionValue(const QString &name, const QVariant &value); void setSessionValue(const QString &name, const QVariant &value);
QIcon locationMarkIcon() const { return m_locationMarkIcon; } QIcon locationMarkIcon() const { return m_locationMarkIcon; }
...@@ -2910,9 +2911,10 @@ const CPlusPlus::Snapshot &DebuggerPluginPrivate::cppCodeModelSnapshot() const ...@@ -2910,9 +2911,10 @@ const CPlusPlus::Snapshot &DebuggerPluginPrivate::cppCodeModelSnapshot() const
void DebuggerPluginPrivate::resetLocation() void DebuggerPluginPrivate::resetLocation()
{ {
currentEngine()->resetLocation(); currentEngine()->resetLocation();
// FIXME: code should be moved here from the engine implementation. }
//d->m_disassemblerViewAgent.resetLocation();
//d->m_stackHandler.setCurrentIndex(-1); void DebuggerPluginPrivate::removeLocationMark()
{
m_locationMark.reset(); m_locationMark.reset();
} }
......
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