summaryrefslogtreecommitdiff
path: root/src/plugins/debugger/breakhandler.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@theqtcompany.com>2015-05-26 15:12:42 +0200
committerEike Ziller <eike.ziller@theqtcompany.com>2015-05-26 15:12:42 +0200
commit3858c33d741cc0bfb120d528b0f3465e665c4bd5 (patch)
treec5fd6289f486a14e698940a40511fa4344a911da /src/plugins/debugger/breakhandler.cpp
parent03b92050e03bbc51f1d49d7dbce8116f23a0c66e (diff)
parentb8038191e693f5649686d56b2192169ea1f53a25 (diff)
downloadqt-creator-3858c33d741cc0bfb120d528b0f3465e665c4bd5.tar.gz
Merge remote-tracking branch 'origin/3.4'
Change-Id: I35ba4cc7f7052699c3006545514c866be3cb5fdd
Diffstat (limited to 'src/plugins/debugger/breakhandler.cpp')
-rw-r--r--src/plugins/debugger/breakhandler.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index 93ee101b89..7c9d7b1d62 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -1185,11 +1185,14 @@ void Breakpoint::gotoLocation() const
if (b->m_params.type == BreakpointByAddress) {
engine->gotoLocation(b->m_params.address);
} else {
- // Don't use gotoLocation as this ends up in disassembly
- // if OperateByInstruction is on.
+ // Don't use gotoLocation unconditionally as this ends up in
+ // disassembly if OperateByInstruction is on. But fallback
+ // to disassembly if we can't open the file.
const QString file = QDir::cleanPath(b->markerFileName());
- IEditor *editor = EditorManager::openEditor(file);
- editor->gotoLine(b->markerLineNumber(), 0);
+ if (IEditor *editor = EditorManager::openEditor(file))
+ editor->gotoLine(b->markerLineNumber(), 0);
+ else
+ engine->openDisassemblerView(Location(b->m_response.address));
}
}
}
@@ -1329,11 +1332,12 @@ BreakpointItem::~BreakpointItem()
void BreakpointItem::destroyMarker()
{
- BreakpointMarker *m = m_marker;
- QTC_ASSERT(m, return);
- m->m_bp = 0;
- m_marker = 0;
- delete m;
+ if (m_marker) {
+ BreakpointMarker *m = m_marker;
+ m->m_bp = 0;
+ m_marker = 0;
+ delete m;
+ }
}
QString BreakpointItem::markerFileName() const