forked from qt-creator/qt-creator
Debugger: Restrict LocationMark dragging
... to engines that actually support JumpToLine and make it work in disassembler views. Change-Id: I10368ea719587caa7c4f33665eff57c2bf300d84 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -30,6 +30,9 @@
|
||||
|
||||
#include "sourceutils.h"
|
||||
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "debuggerengine.h"
|
||||
#include "disassemblerlines.h"
|
||||
#include "watchdata.h"
|
||||
#include "watchutils.h"
|
||||
|
||||
@@ -333,5 +336,19 @@ QString fixCppExpression(const QString &expIn)
|
||||
return removeObviousSideEffects(exp);
|
||||
}
|
||||
|
||||
ContextData getLocationContext(TextDocument *document, int lineNumber)
|
||||
{
|
||||
ContextData data;
|
||||
QTC_ASSERT(document, return data);
|
||||
data.fileName = document->filePath().toString();
|
||||
if (document->property(Constants::OPENED_WITH_DISASSEMBLY).toBool()) {
|
||||
QString line = document->plainText().section(QLatin1Char('\n'), lineNumber - 1, lineNumber - 1);
|
||||
data.address = DisassemblerLine::addressFromDisassemblyLine(line);
|
||||
} else {
|
||||
data.lineNumber = lineNumber;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Debugger
|
||||
|
||||
Reference in New Issue
Block a user