summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2015-05-18 11:09:17 +0200
committerhjk <hjk@theqtcompany.com>2015-05-18 10:08:35 +0000
commit9edbd01922b1d9237030d1eb55d4e1e25483280c (patch)
tree75134fcc237af21ffd75b981149c21e72e463971
parentb44865187742bd7067bf0cc3f39daaad461eb5c4 (diff)
downloadqt-creator-9edbd01922b1d9237030d1eb55d4e1e25483280c.tar.gz
Debugger: Fix crash in breakpoint view
... when double-clicking on an entry for which debug information but no corresponding sources were found. Change-Id: I48f57794e072752d444d7c3ccd8bfe517c9db1dd Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
-rw-r--r--src/plugins/debugger/breakhandler.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp
index 2334e452be..053813441e 100644
--- a/src/plugins/debugger/breakhandler.cpp
+++ b/src/plugins/debugger/breakhandler.cpp
@@ -1182,11 +1182,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));
}
}
}