diff options
author | hjk <[email protected]> | 2015-05-18 11:09:17 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2015-05-18 10:08:35 +0000 |
commit | 9edbd01922b1d9237030d1eb55d4e1e25483280c (patch) | |
tree | 75134fcc237af21ffd75b981149c21e72e463971 /src/plugins/debugger/breakhandler.cpp | |
parent | b44865187742bd7067bf0cc3f39daaad461eb5c4 (diff) |
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 <[email protected]>
Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'src/plugins/debugger/breakhandler.cpp')
-rw-r--r-- | src/plugins/debugger/breakhandler.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plugins/debugger/breakhandler.cpp b/src/plugins/debugger/breakhandler.cpp index 2334e452bea..053813441e5 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)); } } } |