Debugger: Merge GDB and GDB Extended option pages

Change-Id: I0d4c041cec9ea01e1310f08a4ee87ed8080976bd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2022-12-20 11:17:36 +01:00
parent 44d2f15108
commit 2b97f69796
6 changed files with 30 additions and 68 deletions

View File

@@ -155,7 +155,7 @@
You can automatically add breakpoints on some functions to catch error
and warning messages. For more information, see \l{Specifying CDB Settings}
and \l{Specifying Extended GDB Settings}.
and \l{Specifying GDB Settings}.
For more information on breakpoints, see
\l{http://sourceware.org/gdb/onlinedocs/gdb/Breakpoints.html#Breakpoints}

View File

@@ -110,16 +110,11 @@
To execute arbitrary Python scripts, use
\c {python execfile('/path/to/script.py')}.
\section2 Specifying Extended GDB Settings
To specify extended settings for GBD, select \uicontrol Edit >
\uicontrol Preferences > \uicontrol Debugger > \uicontrol {GDB Extended}.
The settings give access to advanced or experimental functions of GDB.
The settings in the \uicontrol Extended group give access to advanced
or experimental functions of GDB.
Enabling them may negatively impact your debugging experience, so use
them with care.
\image qtcreator-gdb-extended-options.png "GDB Extended preferences"
To use asynchronous mode to control the inferior, select the
respective check box.

View File

@@ -414,8 +414,7 @@
To increase the timeout in the \uicontrol {GDB timeout} field, select
\uicontrol Edit > \uicontrol Preferences > \uicontrol Debugger >
\uicontrol GDB. For more information about settings that you can specify
to manage the GDB process, see \l{Specifying GDB Settings} and
\l{Specifying Extended GDB Settings}.
to manage the GDB process, see \l{Specifying GDB Settings}.
For more information about connecting with \c {target extended-remote} mode
in GDB, see \l{https://sourceware.org/gdb/onlinedocs/gdb/Connecting.html}
@@ -630,7 +629,7 @@
The extended GDB settings provide the option to step backwards in code,
but this option should be used with care, as it is slow and unstable on the
GDB side. For more information, see \l{Specifying Extended GDB Settings}.
GDB side. For more information, see \l{Specifying GDB Settings}.
\section2 Customizing Debug Views

View File

@@ -571,15 +571,13 @@ DebuggerSettings::DebuggerSettings()
page2.registerAspect(&useIndexCache);
page2.registerAspect(&gdbStartupCommands);
page2.registerAspect(&gdbPostAttachCommands);
// Page 3
page3.registerAspect(&targetAsync);
page3.registerAspect(&autoEnrichParameters);
page3.registerAspect(&breakOnWarning);
page3.registerAspect(&breakOnFatal);
page3.registerAspect(&breakOnAbort);
page3.registerAspect(&enableReverseDebugging);
page3.registerAspect(&multiInferior);
page2.registerAspect(&targetAsync);
page2.registerAspect(&autoEnrichParameters);
page2.registerAspect(&breakOnWarning);
page2.registerAspect(&breakOnFatal);
page2.registerAspect(&breakOnAbort);
page2.registerAspect(&enableReverseDebugging);
page2.registerAspect(&multiInferior);
// Page 4
page4.registerAspect(&useDebuggingHelpers);
@@ -624,7 +622,6 @@ DebuggerSettings::DebuggerSettings()
// Collect all
all.registerAspects(page1);
all.registerAspects(page2);
all.registerAspects(page3);
all.registerAspects(page4);
all.registerAspects(page5);
all.registerAspects(page6);

View File

@@ -163,7 +163,6 @@ public:
Utils::AspectContainer all; // All
Utils::AspectContainer page1; // General
Utils::AspectContainer page2; // GDB
Utils::AspectContainer page3; // GDB Extended
Utils::AspectContainer page4; // Locals & Expressions
Utils::AspectContainer page5; // CDB
Utils::AspectContainer page6; // CDB Paths

View File

@@ -36,6 +36,12 @@ public:
using namespace Layouting;
DebuggerSettings &s = *debuggerSettings();
auto labelDangerous = new QLabel("<html><head/><body><i>" +
Tr::tr("The options below give access to advanced<br>"
"or experimental functions of GDB.<p>"
"Enabling them may negatively impact<br>"
"your debugging experience.") + "</i></body></html>");
Group general {
title(Tr::tr("General")),
Column {
@@ -49,53 +55,9 @@ public:
s.intelFlavor,
s.usePseudoTracepoints,
s.useIndexCache,
st
}
};
Column commands {
Group {
title(Tr::tr("Additional Startup Commands")),
Column { s.gdbStartupCommands }
},
Group {
title(Tr::tr("Additional Attach Commands")),
Column { s.gdbPostAttachCommands },
},
st
};
Row { general, commands }.attachTo(w);
});
}
};
/////////////////////////////////////////////////////////////////////////
//
// GdbOptionsPage2 - dangerous options
//
/////////////////////////////////////////////////////////////////////////
// The "Dangerous" options.
class GdbOptionsPage2 : public Core::IOptionsPage
{
public:
GdbOptionsPage2()
{
setId("M.Gdb2");
setDisplayName(Tr::tr("GDB Extended"));
setCategory(Constants::DEBUGGER_SETTINGS_CATEGORY);
setSettings(&debuggerSettings()->page3);
setLayouter([](QWidget *w) {
auto labelDangerous = new QLabel("<html><head/><body><i>" +
Tr::tr("The options below give access to advanced "
"or experimental functions of GDB.<br>Enabling them may negatively "
"impact your debugging experience.") + "</i></body></html>");
using namespace Layouting;
DebuggerSettings &s = *debuggerSettings();
Group extended {
title(Tr::tr("Extended")),
Column {
@@ -107,10 +69,21 @@ public:
s.breakOnAbort,
s.enableReverseDebugging,
s.multiInferior,
st
}
};
Column { extended, st }.attachTo(w);
Group startup {
title(Tr::tr("Additional Startup Commands")),
Column { s.gdbStartupCommands }
};
Group attach {
title(Tr::tr("Additional Attach Commands")),
Column { s.gdbPostAttachCommands },
};
Grid { general, extended, br, startup, attach }.attachTo(w);
});
}
};
@@ -120,7 +93,6 @@ public:
void addGdbOptionPages(QList<IOptionsPage *> *opts)
{
opts->push_back(new GdbOptionsPage);
opts->push_back(new GdbOptionsPage2);
}
} // Debugger::Internal