Commit 715d3f4e authored by hjk's avatar hjk
Browse files

Debugger: Fall back to assembler in LLDB



... if source file does not exist. This is the same
logic as for GDB now.

Change-Id: I3e5a3273b571658b4dd4200c9b3a0e9542a16015
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 82268eb7
......@@ -100,6 +100,7 @@ public:
void setNeedsRaise(bool on) { m_needsRaise = on; }
void setNeedsMarker(bool on) { m_needsMarker = on; }
void setFileName(const QString &fileName) { m_fileName = fileName; }
void setUseAssembler(bool on) { m_hasDebugInfo = !on; }
bool needsRaise() const { return m_needsRaise; }
bool needsMarker() const { return m_needsMarker; }
bool hasDebugInfo() const { return m_hasDebugInfo; }
......
......@@ -1176,15 +1176,16 @@ void LldbEngine::refreshState(const GdbMi &reportedState)
void LldbEngine::refreshLocation(const GdbMi &reportedLocation)
{
if (boolSetting(OperateByInstruction)) {
Location loc(reportedLocation["addr"].toAddress());
qulonglong addr = reportedLocation["addr"].toAddress();
QString file = reportedLocation["file"].toUtf8();
int line = reportedLocation["line"].toInt();
Location loc = Location(file, line);
if (boolSetting(OperateByInstruction) || !QFileInfo::exists(file) || line <= 0) {
loc = Location(addr);
loc.setNeedsMarker(true);
gotoLocation(loc);
} else {
QString file = reportedLocation["file"].toUtf8();
int line = reportedLocation["line"].toInt();
gotoLocation(Location(file, line));
loc.setUseAssembler(true);
}
gotoLocation(loc);
}
void LldbEngine::reloadRegisters()
......
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