Commit ce6d69b7 authored by hjk's avatar hjk Committed by Eike Ziller
Browse files

Debugger: Fix setting breakpoints in disassembly view



This is a regression, the editor was not recognized as being
a disassembly view anymore.

Change-Id: I281ecf0a49bb4e365b252793f6a5aa89f7b432ff
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 929f12ee
......@@ -2059,13 +2059,15 @@ void DebuggerPluginPrivate::requestMark(ITextEditor *editor,
if (kind != ITextEditor::BreakpointRequest)
return;
if (editor->property("DisassemblerView").toBool()) {
QString line = editor->textDocument()->plainText()
.section(QLatin1Char('\n'), lineNumber - 1, lineNumber - 1);
quint64 address = DisassemblerLine::addressFromDisassemblyLine(line);
toggleBreakpointByAddress(address);
} else if (editor->document()) {
toggleBreakpointByFileAndLine(editor->document()->filePath(), lineNumber);
if (IDocument *document = editor->document()) {
if (document->property(Constants::OPENED_WITH_DISASSEMBLY).toBool()) {
QString line = editor->textDocument()->plainText()
.section(QLatin1Char('\n'), lineNumber - 1, lineNumber - 1);
quint64 address = DisassemblerLine::addressFromDisassemblyLine(line);
toggleBreakpointByAddress(address);
} else {
toggleBreakpointByFileAndLine(document->filePath(), lineNumber);
}
}
}
......
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