forked from qt-creator/qt-creator
Debugger: Add an option to enable newer gdb's symbol index cache
GDB 8.3+ can automatically save indices of DWARF symbols on disk to speed up further loading of the same binaries. Make this option available to the user and switch it on by default. No harm is done for gdb builds without this feature. Task-number: QTCREATORBUG-23207 Change-Id: Id0d467eee429a94f1d8e826a883179796732d31e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -431,6 +431,13 @@ DebuggerSettings::DebuggerSettings()
|
||||
/*GdbOptionsPage::*/ tr("Uses Python to extend the ordinary GDB breakpoint class."));
|
||||
usePseudoTracepoints.setDefaultValue(true);
|
||||
|
||||
useIndexCache.setSettingsKey(debugModeGroup, "UseIndexCache");
|
||||
useIndexCache.setLabelText(tr("Use automatic symbol cache"));
|
||||
useIndexCache.setToolTip(tr("It is possible for GDB to automatically save a copy of "
|
||||
"its symbol index in a cache on disk and retrieve it from there when loading the same "
|
||||
"binary in the future."));
|
||||
useIndexCache.setDefaultValue(true);
|
||||
|
||||
useToolTipsInMainEditor.setSettingsKey(debugModeGroup, "UseToolTips");
|
||||
useToolTipsInMainEditor.setLabelText(tr("Use tooltips in main editor when debugging"));
|
||||
useToolTipsInMainEditor.setToolTip(tr("<p>Checking this will enable tooltips for variable "
|
||||
@@ -584,6 +591,7 @@ DebuggerSettings::DebuggerSettings()
|
||||
page2.registerAspect(&intelFlavor);
|
||||
page2.registerAspect(&skipKnownFrames);
|
||||
page2.registerAspect(&usePseudoTracepoints);
|
||||
page2.registerAspect(&useIndexCache);
|
||||
page2.registerAspect(&gdbStartupCommands);
|
||||
page2.registerAspect(&gdbPostAttachCommands);
|
||||
|
||||
|
@@ -112,6 +112,7 @@ public:
|
||||
Utils::BoolAspect loadGdbDumpers;
|
||||
Utils::BoolAspect intelFlavor;
|
||||
Utils::BoolAspect usePseudoTracepoints;
|
||||
Utils::BoolAspect useIndexCache;
|
||||
Utils::StringAspect gdbStartupCommands;
|
||||
Utils::StringAspect gdbPostAttachCommands;
|
||||
|
||||
|
@@ -3891,6 +3891,9 @@ void GdbEngine::setupEngine()
|
||||
runCommand({"set breakpoint pending on"});
|
||||
runCommand({"set print elements 10000"});
|
||||
|
||||
if (debuggerSettings()->useIndexCache.value())
|
||||
runCommand({"set index-cache on"});
|
||||
|
||||
// Produces a few messages during symtab loading
|
||||
//runCommand("set verbose on");
|
||||
|
||||
|
@@ -71,6 +71,7 @@ public:
|
||||
s.loadGdbDumpers,
|
||||
s.intelFlavor,
|
||||
s.usePseudoTracepoints,
|
||||
s.useIndexCache,
|
||||
Stretch()
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user