Commit 9edbd019 authored by hjk's avatar hjk
Browse files

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: default avatarEike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
parent b4486518
...@@ -1182,11 +1182,14 @@ void Breakpoint::gotoLocation() const ...@@ -1182,11 +1182,14 @@ void Breakpoint::gotoLocation() const
if (b->m_params.type == BreakpointByAddress) { if (b->m_params.type == BreakpointByAddress) {
engine->gotoLocation(b->m_params.address); engine->gotoLocation(b->m_params.address);
} else { } else {
// Don't use gotoLocation as this ends up in disassembly // Don't use gotoLocation unconditionally as this ends up in
// if OperateByInstruction is on. // disassembly if OperateByInstruction is on. But fallback
// to disassembly if we can't open the file.
const QString file = QDir::cleanPath(b->markerFileName()); const QString file = QDir::cleanPath(b->markerFileName());
IEditor *editor = EditorManager::openEditor(file); if (IEditor *editor = EditorManager::openEditor(file))
editor->gotoLine(b->markerLineNumber(), 0); editor->gotoLine(b->markerLineNumber(), 0);
else
engine->openDisassemblerView(Location(b->m_response.address));
} }
} }
} }
......
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