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},
|
||||
usePseudoTracepoints{gdbSettings().usePseudoTracepoints},
|
||||
useIndexCache{gdbSettings().useIndexCache},
|
||||
useDebugInfoD{gdbSettings().useDebugInfoD},
|
||||
gdbStartupCommands{gdbSettings().gdbStartupCommands},
|
||||
gdbPostAttachCommands{gdbSettings().gdbPostAttachCommands},
|
||||
targetAsync{gdbSettings().targetAsync},
|
||||
|
||||
@@ -48,6 +48,7 @@ public:
|
||||
Utils::BoolAspect &intelFlavor;
|
||||
Utils::BoolAspect &usePseudoTracepoints;
|
||||
Utils::BoolAspect &useIndexCache;
|
||||
Utils::TriStateAspect &useDebugInfoD;
|
||||
Utils::StringAspect &gdbStartupCommands;
|
||||
Utils::StringAspect &gdbPostAttachCommands;
|
||||
|
||||
|
||||
@@ -1492,6 +1492,16 @@ void GdbEngine::handleShowVersion(const DebuggerResponse &response)
|
||||
runCommand({"set target-async off", 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."));
|
||||
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.setDisplayName(Tr::tr("Skip Known Frames"));
|
||||
skipKnownFrames.setLabelText(Tr::tr("Skip known frames when stepping"));
|
||||
@@ -221,6 +227,7 @@ GdbSettings::GdbSettings()
|
||||
intelFlavor,
|
||||
usePseudoTracepoints,
|
||||
useIndexCache,
|
||||
Row { useDebugInfoD, st },
|
||||
st
|
||||
}
|
||||
};
|
||||
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
Utils::BoolAspect intelFlavor{this};
|
||||
Utils::BoolAspect usePseudoTracepoints{this};
|
||||
Utils::BoolAspect useIndexCache{this};
|
||||
Utils::TriStateAspect useDebugInfoD{this};
|
||||
Utils::StringAspect gdbStartupCommands{this};
|
||||
Utils::StringAspect gdbPostAttachCommands{this};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user