forked from qt-creator/qt-creator
Debugger: Add a settings for gdb's debuginfod feature
Fixes: QTCREATORBUG-28868 Change-Id: I216dbf8b46329c64607c869b5a8e090ef67fabb0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -60,6 +60,7 @@ DebuggerSettings::DebuggerSettings() :
|
|||||||
intelFlavor{gdbSettings().intelFlavor},
|
intelFlavor{gdbSettings().intelFlavor},
|
||||||
usePseudoTracepoints{gdbSettings().usePseudoTracepoints},
|
usePseudoTracepoints{gdbSettings().usePseudoTracepoints},
|
||||||
useIndexCache{gdbSettings().useIndexCache},
|
useIndexCache{gdbSettings().useIndexCache},
|
||||||
|
useDebugInfoD{gdbSettings().useDebugInfoD},
|
||||||
gdbStartupCommands{gdbSettings().gdbStartupCommands},
|
gdbStartupCommands{gdbSettings().gdbStartupCommands},
|
||||||
gdbPostAttachCommands{gdbSettings().gdbPostAttachCommands},
|
gdbPostAttachCommands{gdbSettings().gdbPostAttachCommands},
|
||||||
targetAsync{gdbSettings().targetAsync},
|
targetAsync{gdbSettings().targetAsync},
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public:
|
|||||||
Utils::BoolAspect &intelFlavor;
|
Utils::BoolAspect &intelFlavor;
|
||||||
Utils::BoolAspect &usePseudoTracepoints;
|
Utils::BoolAspect &usePseudoTracepoints;
|
||||||
Utils::BoolAspect &useIndexCache;
|
Utils::BoolAspect &useIndexCache;
|
||||||
|
Utils::TriStateAspect &useDebugInfoD;
|
||||||
Utils::StringAspect &gdbStartupCommands;
|
Utils::StringAspect &gdbStartupCommands;
|
||||||
Utils::StringAspect &gdbPostAttachCommands;
|
Utils::StringAspect &gdbPostAttachCommands;
|
||||||
|
|
||||||
|
|||||||
@@ -1492,6 +1492,16 @@ void GdbEngine::handleShowVersion(const DebuggerResponse &response)
|
|||||||
runCommand({"set target-async off", ConsoleCommand});
|
runCommand({"set target-async off", ConsoleCommand});
|
||||||
|
|
||||||
//runCommand("set build-id-verbose 2", ConsoleCommand);
|
//runCommand("set build-id-verbose 2", ConsoleCommand);
|
||||||
|
|
||||||
|
if (m_gdbVersion >= 100100) {
|
||||||
|
const TriState useDebugInfoD = settings().useDebugInfoD();
|
||||||
|
if (useDebugInfoD == TriState::Enabled) {
|
||||||
|
runCommand({"set debuginfod verbose 1"});
|
||||||
|
runCommand({"set debuginfod enabled on"});
|
||||||
|
} else if (useDebugInfoD == TriState::Disabled) {
|
||||||
|
runCommand({"set debuginfod enabled off"});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -166,6 +166,12 @@ GdbSettings::GdbSettings()
|
|||||||
"binary in the future."));
|
"binary in the future."));
|
||||||
useIndexCache.setDefaultValue(true);
|
useIndexCache.setDefaultValue(true);
|
||||||
|
|
||||||
|
useDebugInfoD.setSettingsKey("UseDebugInfoD");
|
||||||
|
useDebugInfoD.setLabelText(Tr::tr("Use debug info daemon"));
|
||||||
|
useDebugInfoD.setOptionTexts({}, {}, tr("Use system settings"));
|
||||||
|
useDebugInfoD.setToolTip(Tr::tr("Lets GDB attempt to automatically retrieve "
|
||||||
|
"debug information for system packages."));
|
||||||
|
|
||||||
skipKnownFrames.setSettingsKey("SkipKnownFrames");
|
skipKnownFrames.setSettingsKey("SkipKnownFrames");
|
||||||
skipKnownFrames.setDisplayName(Tr::tr("Skip Known Frames"));
|
skipKnownFrames.setDisplayName(Tr::tr("Skip Known Frames"));
|
||||||
skipKnownFrames.setLabelText(Tr::tr("Skip known frames when stepping"));
|
skipKnownFrames.setLabelText(Tr::tr("Skip known frames when stepping"));
|
||||||
@@ -221,6 +227,7 @@ GdbSettings::GdbSettings()
|
|||||||
intelFlavor,
|
intelFlavor,
|
||||||
usePseudoTracepoints,
|
usePseudoTracepoints,
|
||||||
useIndexCache,
|
useIndexCache,
|
||||||
|
Row { useDebugInfoD, st },
|
||||||
st
|
st
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ public:
|
|||||||
Utils::BoolAspect intelFlavor{this};
|
Utils::BoolAspect intelFlavor{this};
|
||||||
Utils::BoolAspect usePseudoTracepoints{this};
|
Utils::BoolAspect usePseudoTracepoints{this};
|
||||||
Utils::BoolAspect useIndexCache{this};
|
Utils::BoolAspect useIndexCache{this};
|
||||||
|
Utils::TriStateAspect useDebugInfoD{this};
|
||||||
Utils::StringAspect gdbStartupCommands{this};
|
Utils::StringAspect gdbStartupCommands{this};
|
||||||
Utils::StringAspect gdbPostAttachCommands{this};
|
Utils::StringAspect gdbPostAttachCommands{this};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user