forked from qt-creator/qt-creator
Debugger: Adapt to change in FilePath
Change-Id: I947f7c22bd59e445c94784fc50f29f6b571aad5a Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -2608,7 +2608,7 @@ static StackFrames parseFrames(const GdbMi &gdbmi, bool *incomplete = nullptr)
|
|||||||
frame.level = QString::number(i);
|
frame.level = QString::number(i);
|
||||||
const GdbMi fullName = frameMi["fullname"];
|
const GdbMi fullName = frameMi["fullname"];
|
||||||
if (fullName.isValid()) {
|
if (fullName.isValid()) {
|
||||||
frame.file = FilePath::fromString(fullName.data()).normalizedPathName();
|
frame.file = FilePath::fromUserInput(fullName.data()).normalizedPathName();
|
||||||
frame.line = frameMi["line"].data().toInt();
|
frame.line = frameMi["line"].data().toInt();
|
||||||
frame.usable = false; // To be decided after source path mapping.
|
frame.usable = false; // To be decided after source path mapping.
|
||||||
const GdbMi languageMi = frameMi["language"];
|
const GdbMi languageMi = frameMi["language"];
|
||||||
|
@@ -1600,7 +1600,7 @@ QString GdbEngine::cleanupFullName(const QString &fileName)
|
|||||||
}
|
}
|
||||||
|
|
||||||
cleanFilePath.clear();
|
cleanFilePath.clear();
|
||||||
const QString base = FilePath::fromString(fileName).fileName();
|
const QString base = FilePath::fromUserInput(fileName).fileName();
|
||||||
|
|
||||||
QMultiMap<QString, QString>::const_iterator jt = m_baseNameToFullName.constFind(base);
|
QMultiMap<QString, QString>::const_iterator jt = m_baseNameToFullName.constFind(base);
|
||||||
while (jt != m_baseNameToFullName.constEnd() && jt.key() == base) {
|
while (jt != m_baseNameToFullName.constEnd() && jt.key() == base) {
|
||||||
|
@@ -281,7 +281,7 @@ void ModulesHandler::updateModule(const Module &module)
|
|||||||
}
|
}
|
||||||
|
|
||||||
try { // MinGW occasionallly throws std::bad_alloc.
|
try { // MinGW occasionallly throws std::bad_alloc.
|
||||||
ElfReader reader(FilePath::fromString(path));
|
ElfReader reader(FilePath::fromUserInput(path));
|
||||||
item->module.elfData = reader.readHeaders();
|
item->module.elfData = reader.readHeaders();
|
||||||
item->update();
|
item->update();
|
||||||
} catch(...) {
|
} catch(...) {
|
||||||
|
@@ -74,7 +74,7 @@ StackFrame StackFrame::parseFrame(const GdbMi &frameMi, const DebuggerRunParamet
|
|||||||
frame.function = frameMi["function"].data();
|
frame.function = frameMi["function"].data();
|
||||||
frame.module = frameMi["module"].data();
|
frame.module = frameMi["module"].data();
|
||||||
const FilePath debugger = rp.debugger.command.executable();
|
const FilePath debugger = rp.debugger.command.executable();
|
||||||
const FilePath onDevicePath = FilePath::fromString(frameMi["file"].data()).onDevice(debugger);
|
const FilePath onDevicePath = FilePath::fromUserInput(frameMi["file"].data()).onDevice(debugger);
|
||||||
frame.file = onDevicePath.localSource().value_or(onDevicePath);
|
frame.file = onDevicePath.localSource().value_or(onDevicePath);
|
||||||
frame.line = frameMi["line"].toInt();
|
frame.line = frameMi["line"].toInt();
|
||||||
frame.address = frameMi["address"].toAddress();
|
frame.address = frameMi["address"].toAddress();
|
||||||
|
Reference in New Issue
Block a user