2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2009-03-18 10:04:02 +01:00
|
|
|
|
|
|
|
|
#include "debuggeractions.h"
|
2021-03-01 08:59:44 +01:00
|
|
|
|
|
|
|
|
#include "commonoptionspage.h"
|
2015-11-23 16:41:54 +01:00
|
|
|
#include "debuggericons.h"
|
2021-03-01 08:59:44 +01:00
|
|
|
#include "debuggerinternalconstants.h"
|
2022-07-05 15:37:08 +02:00
|
|
|
#include "debuggertr.h"
|
2023-07-17 17:20:59 +02:00
|
|
|
#include "gdb/gdbsettings.h"
|
2012-04-11 09:16:06 +02:00
|
|
|
|
2014-12-12 08:26:55 +01:00
|
|
|
#include <coreplugin/coreconstants.h>
|
2023-07-18 14:14:18 +02:00
|
|
|
#include <coreplugin/icore.h>
|
2021-03-01 08:59:44 +01:00
|
|
|
|
2022-05-24 00:40:44 +02:00
|
|
|
#include <utils/hostosinfo.h>
|
2009-03-19 09:32:09 +01:00
|
|
|
#include <utils/qtcassert.h>
|
|
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QDebug>
|
2023-06-21 15:12:46 +02:00
|
|
|
#include <QGuiApplication>
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2009-10-05 11:06:05 +02:00
|
|
|
using namespace Utils;
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2022-07-05 15:37:08 +02:00
|
|
|
namespace Debugger::Internal {
|
|
|
|
|
|
2009-03-19 15:44:26 +01:00
|
|
|
// DebuggerSettings
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2023-07-13 15:23:29 +02:00
|
|
|
DebuggerSettings &settings()
|
2021-03-01 08:59:44 +01:00
|
|
|
{
|
2023-07-13 15:23:29 +02:00
|
|
|
static DebuggerSettings settings;
|
|
|
|
|
return settings;
|
2021-03-01 08:59:44 +01:00
|
|
|
}
|
Debugger: Make most views per-engine instead of singletons
This is a step towards properly supporting multiple debugger
sessions side-by-side.
The combined C++-and-QML engine has been removed, instead a
combined setup creates now two individual engines, under a single
DebuggerRunTool but mostly independent with no combined state
machine. This requires a few more clicks in some cases, but
makes it easier to direct e.g. interrupt requests to the
interesting engine.
Care has been taken to not change the UX of the single debugger
session use case if possible. The fat debug button operates
as-before in that case, i.e. switches to Interrupt if the
single active runconfiguration runs in the debugger etc.
Most views are made per-engine, running an engine creates
a new Perspective, which is destroyed when the run control dies.
The snapshot view remains global and becomes primary source
of information on a "current engine" that receives all menu
and otherwise global input.
There is a new global "Breakpoint Preset" view containing
all "static" breakpoint data. When an engine starts up it
"claims" breakpoint it believes it can handle, but operates
on a copy of the static data. The markers of the static
version are suppressed as long as an engine controls a
breakpoint (that inclusive all resolved locations), but are
re-instatet once the engine quits.
The old Breakpoint class that already contained this split
per-instance was split into a new Breakpoint and a
GlobalBreakpoint class, with a per-engine model for Breakpoints,
and a singleton model containing GlobalBreakpoints.
There is a new CppDebuggerEngine intermediate level serving as
base for C++ (or, rather, "compiled") binary debugging, i.e.
{Gdb,Lldb,Cdb}Engine, taking over bits of the current DebuggerEngine
base that are not applicable to non-binary debuggers.
Change-Id: I9994f4c188379b4aee0c4f379edd4759fbb0bd43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-07-31 12:30:48 +02:00
|
|
|
|
2023-07-17 17:20:59 +02:00
|
|
|
DebuggerSettings::DebuggerSettings() :
|
2023-07-18 10:49:35 +02:00
|
|
|
useAlternatingRowColors{commonSettings().useAlternatingRowColors},
|
|
|
|
|
useAnnotationsInMainEditor{commonSettings().useAnnotationsInMainEditor},
|
|
|
|
|
useToolTipsInMainEditor{commonSettings().useToolTipsInMainEditor},
|
|
|
|
|
closeSourceBuffersOnExit{commonSettings().closeSourceBuffersOnExit},
|
|
|
|
|
closeMemoryBuffersOnExit{commonSettings().closeMemoryBuffersOnExit},
|
|
|
|
|
raiseOnInterrupt{commonSettings().raiseOnInterrupt},
|
|
|
|
|
breakpointsFullPathByDefault{commonSettings().breakpointsFullPathByDefault},
|
|
|
|
|
warnOnReleaseBuilds{commonSettings().warnOnReleaseBuilds},
|
|
|
|
|
maximalStackDepth{commonSettings().maximalStackDepth},
|
|
|
|
|
|
|
|
|
|
fontSizeFollowsEditor{commonSettings().fontSizeFollowsEditor},
|
|
|
|
|
switchModeOnExit{commonSettings().switchModeOnExit},
|
|
|
|
|
showQmlObjectTree{commonSettings().showQmlObjectTree},
|
|
|
|
|
stationaryEditorWhileStepping{commonSettings().stationaryEditorWhileStepping},
|
|
|
|
|
forceLoggingToConsole{commonSettings().forceLoggingToConsole},
|
|
|
|
|
|
|
|
|
|
sourcePathMap{commonSettings().sourcePathMap},
|
|
|
|
|
registerForPostMortem{*commonSettings().registerForPostMortem},
|
|
|
|
|
|
2023-07-17 17:20:59 +02:00
|
|
|
gdbWatchdogTimeout{gdbSettings().gdbWatchdogTimeout},
|
|
|
|
|
skipKnownFrames{gdbSettings().skipKnownFrames},
|
|
|
|
|
useMessageBoxForSignals{gdbSettings().useMessageBoxForSignals},
|
|
|
|
|
adjustBreakpointLocations{gdbSettings().adjustBreakpointLocations},
|
|
|
|
|
useDynamicType{gdbSettings().useDynamicType},
|
|
|
|
|
loadGdbInit{gdbSettings().loadGdbInit},
|
|
|
|
|
loadGdbDumpers{gdbSettings().loadGdbDumpers},
|
|
|
|
|
intelFlavor{gdbSettings().intelFlavor},
|
|
|
|
|
usePseudoTracepoints{gdbSettings().usePseudoTracepoints},
|
|
|
|
|
useIndexCache{gdbSettings().useIndexCache},
|
|
|
|
|
gdbStartupCommands{gdbSettings().gdbStartupCommands},
|
|
|
|
|
gdbPostAttachCommands{gdbSettings().gdbPostAttachCommands},
|
|
|
|
|
targetAsync{gdbSettings().targetAsync},
|
|
|
|
|
autoEnrichParameters{gdbSettings().autoEnrichParameters},
|
|
|
|
|
breakOnThrow{gdbSettings().breakOnThrow},
|
|
|
|
|
breakOnCatch{gdbSettings().breakOnCatch},
|
|
|
|
|
breakOnWarning{gdbSettings().breakOnWarning},
|
|
|
|
|
breakOnFatal{gdbSettings().breakOnFatal},
|
|
|
|
|
breakOnAbort{gdbSettings().breakOnAbort},
|
|
|
|
|
enableReverseDebugging{gdbSettings().enableReverseDebugging},
|
2023-07-26 07:39:55 +02:00
|
|
|
multiInferior{gdbSettings().multiInferior},
|
|
|
|
|
|
|
|
|
|
// Page 4
|
|
|
|
|
useDebuggingHelpers{localsAndExpressionSettings().useDebuggingHelpers},
|
|
|
|
|
useCodeModel{localsAndExpressionSettings().useCodeModel},
|
|
|
|
|
showThreadNames{localsAndExpressionSettings().showThreadNames},
|
|
|
|
|
extraDumperFile{localsAndExpressionSettings().extraDumperFile}, // For loading a file. Recommended.
|
|
|
|
|
extraDumperCommands{localsAndExpressionSettings().extraDumperCommands}, // To modify an existing setup.
|
|
|
|
|
|
|
|
|
|
showStdNamespace{localsAndExpressionSettings().showStdNamespace},
|
|
|
|
|
showQtNamespace{localsAndExpressionSettings().showQtNamespace},
|
|
|
|
|
showQObjectNames{localsAndExpressionSettings().showQObjectNames},
|
|
|
|
|
maximalStringLength{localsAndExpressionSettings().maximalStringLength},
|
|
|
|
|
displayStringLimit{localsAndExpressionSettings().displayStringLimit},
|
|
|
|
|
defaultArraySize{localsAndExpressionSettings().defaultArraySize}
|
2009-03-19 09:32:09 +01:00
|
|
|
{
|
2023-08-24 16:14:26 +02:00
|
|
|
const Key debugModeGroup("DebugMode");
|
|
|
|
|
const Key cdbSettingsGroup("CDB2");
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2022-07-05 15:37:08 +02:00
|
|
|
settingsDialog.setLabelText(Tr::tr("Configure Debugger..."));
|
2021-03-01 08:59:44 +01:00
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
groupBoxPluginDebugging = new QGroupBox(q);
|
2022-07-05 15:37:08 +02:00
|
|
|
groupBoxPluginDebugging->setTitle(Tr::tr(
|
2021-03-01 08:59:44 +01:00
|
|
|
"Behavior of Breakpoint Setting in Plugins"));
|
|
|
|
|
|
|
|
|
|
radioButtonAllPluginBreakpoints = new QRadioButton(groupBoxPluginDebugging);
|
2022-07-05 15:37:08 +02:00
|
|
|
radioButtonAllPluginBreakpoints->setText(Tr::tr(
|
2021-03-01 08:59:44 +01:00
|
|
|
"Always try to set breakpoints in plugins automatically"));
|
2022-07-05 15:37:08 +02:00
|
|
|
radioButtonAllPluginBreakpoints->setToolTip(Tr::tr(
|
2021-03-01 08:59:44 +01:00
|
|
|
"This is the slowest but safest option."));
|
2009-03-19 09:32:09 +01:00
|
|
|
|
2021-03-01 08:59:44 +01:00
|
|
|
radioButtonSelectedPluginBreakpoints = new QRadioButton(groupBoxPluginDebugging);
|
2022-07-05 15:37:08 +02:00
|
|
|
radioButtonSelectedPluginBreakpoints->setText(Tr::tr(
|
2021-03-01 08:59:44 +01:00
|
|
|
"Try to set breakpoints in selected plugins"));
|
|
|
|
|
|
|
|
|
|
radioButtonNoPluginBreakpoints = new QRadioButton(groupBoxPluginDebugging);
|
2022-07-05 15:37:08 +02:00
|
|
|
radioButtonNoPluginBreakpoints->setText(Tr::tr(
|
2021-03-01 08:59:44 +01:00
|
|
|
"Never set breakpoints in plugins automatically"));
|
|
|
|
|
|
|
|
|
|
lineEditSelectedPluginBreakpointsPattern = new QLineEdit(groupBoxPluginDebugging);
|
|
|
|
|
|
|
|
|
|
labelSelectedPluginBreakpoints = new QLabel(groupBoxPluginDebugging);
|
2022-07-05 15:37:08 +02:00
|
|
|
labelSelectedPluginBreakpoints->setText(Tr::tr(
|
2021-03-01 08:59:44 +01:00
|
|
|
"Matching regular expression: "));
|
|
|
|
|
*/
|
2009-03-27 13:04:23 +01:00
|
|
|
|
2009-03-25 12:30:13 +01:00
|
|
|
//
|
|
|
|
|
// View
|
|
|
|
|
//
|
2022-07-05 15:37:08 +02:00
|
|
|
alwaysAdjustColumnWidths.setLabelText(Tr::tr("Always Adjust View Column Widths to Contents"));
|
2021-03-01 08:59:44 +01:00
|
|
|
alwaysAdjustColumnWidths.setSettingsKey(debugModeGroup, "AlwaysAdjustColumnWidths");
|
|
|
|
|
alwaysAdjustColumnWidths.setDefaultValue(true);
|
2011-03-16 18:48:14 +01:00
|
|
|
|
2022-07-05 15:37:08 +02:00
|
|
|
logTimeStamps.setLabelText(Tr::tr("Log Time Stamps"));
|
2021-03-01 08:59:44 +01:00
|
|
|
logTimeStamps.setSettingsKey(debugModeGroup, "LogTimeStamps");
|
|
|
|
|
|
2022-07-05 15:37:08 +02:00
|
|
|
autoDerefPointers.setLabelText(Tr::tr("Dereference Pointers Automatically"));
|
2021-03-01 08:59:44 +01:00
|
|
|
autoDerefPointers.setDefaultValue(true);
|
|
|
|
|
autoDerefPointers.setSettingsKey(debugModeGroup, "AutoDerefPointers");
|
2023-02-27 13:33:15 +01:00
|
|
|
autoDerefPointers.setToolTip(
|
|
|
|
|
"<p>"
|
|
|
|
|
+ Tr::tr("This switches the Locals and Expressions views to "
|
|
|
|
|
"automatically dereference pointers. This saves a level in the "
|
|
|
|
|
"tree view, but also loses data for the now-missing intermediate "
|
|
|
|
|
"level."));
|
2009-10-06 10:54:08 +02:00
|
|
|
|
2013-05-22 00:49:51 -07:00
|
|
|
//
|
|
|
|
|
// Cdb Options
|
|
|
|
|
//
|
|
|
|
|
|
2021-03-01 08:59:44 +01:00
|
|
|
cdbAdditionalArguments.setSettingsKey(cdbSettingsGroup, "AdditionalArguments");
|
|
|
|
|
cdbAdditionalArguments.setDisplayStyle(StringAspect::LineEditDisplay);
|
2022-07-05 15:37:08 +02:00
|
|
|
cdbAdditionalArguments.setLabelText(Tr::tr("Additional arguments:"));
|
2021-03-01 08:59:44 +01:00
|
|
|
|
|
|
|
|
cdbSymbolPaths.setSettingsKey(cdbSettingsGroup, "SymbolPaths");
|
|
|
|
|
cdbSourcePaths.setSettingsKey(cdbSettingsGroup, "SourcePaths");
|
|
|
|
|
|
|
|
|
|
cdbBreakEvents.setSettingsKey(cdbSettingsGroup, "BreakEvent");
|
|
|
|
|
cdbBreakOnCrtDbgReport.setSettingsKey(cdbSettingsGroup, "BreakOnCrtDbgReport");
|
2023-07-18 10:49:35 +02:00
|
|
|
cdbBreakOnCrtDbgReport.setLabelText(msgSetBreakpointAtFunction(Constants::CRT_DEBUG_REPORT));
|
|
|
|
|
cdbBreakOnCrtDbgReport.setToolTip(msgSetBreakpointAtFunctionToolTip(Constants::CRT_DEBUG_REPORT,
|
|
|
|
|
Tr::tr("Catches runtime error messages caused by assert(), for example.")));
|
2021-03-01 08:59:44 +01:00
|
|
|
|
|
|
|
|
useCdbConsole.setSettingsKey(cdbSettingsGroup, "CDB_Console");
|
2022-07-05 15:37:08 +02:00
|
|
|
useCdbConsole.setToolTip("<html><head/><body><p>" + Tr::tr(
|
2021-03-01 08:59:44 +01:00
|
|
|
"Uses CDB's native console for console applications. "
|
|
|
|
|
"This overrides the setting in Environment > System. "
|
|
|
|
|
"The native console does not prompt on application exit. "
|
|
|
|
|
"It is suitable for diagnosing cases in which the application does not "
|
|
|
|
|
"start up properly in the configured console and the subsequent attach fails.")
|
|
|
|
|
+ "</p></body></html>");
|
2022-07-05 15:37:08 +02:00
|
|
|
useCdbConsole.setLabelText(Tr::tr("Use CDB &console"));
|
2021-03-01 08:59:44 +01:00
|
|
|
|
|
|
|
|
cdbBreakPointCorrection.setSettingsKey(cdbSettingsGroup, "BreakpointCorrection");
|
|
|
|
|
cdbBreakPointCorrection.setDefaultValue(true);
|
2022-07-05 15:37:08 +02:00
|
|
|
cdbBreakPointCorrection.setToolTip("<html><head/><body><p>" + Tr::tr(
|
2023-01-10 12:44:33 +01:00
|
|
|
"Attempts to correct the location of a breakpoint based on file and line number should "
|
2021-03-01 08:59:44 +01:00
|
|
|
"it be in a comment or in a line for which no code is generated. "
|
|
|
|
|
"The correction is based on the code model.") + "</p></body></html>");
|
2022-07-05 15:37:08 +02:00
|
|
|
cdbBreakPointCorrection.setLabelText(Tr::tr("Correct breakpoint location"));
|
2021-03-01 08:59:44 +01:00
|
|
|
|
|
|
|
|
cdbUsePythonDumper.setSettingsKey(cdbSettingsGroup, "UsePythonDumper");
|
|
|
|
|
cdbUsePythonDumper.setDefaultValue(true);
|
2022-07-05 15:37:08 +02:00
|
|
|
cdbUsePythonDumper.setLabelText(Tr::tr("Use Python dumper"));
|
2021-03-01 08:59:44 +01:00
|
|
|
|
|
|
|
|
firstChanceExceptionTaskEntry.setSettingsKey(cdbSettingsGroup, "FirstChanceExceptionTaskEntry");
|
|
|
|
|
firstChanceExceptionTaskEntry.setDefaultValue(true);
|
2022-07-05 15:37:08 +02:00
|
|
|
firstChanceExceptionTaskEntry.setLabelText(Tr::tr("First chance exceptions"));
|
2021-03-01 08:59:44 +01:00
|
|
|
|
|
|
|
|
secondChanceExceptionTaskEntry.setSettingsKey(cdbSettingsGroup, "SecondChanceExceptionTaskEntry");
|
|
|
|
|
secondChanceExceptionTaskEntry.setDefaultValue(true);
|
2022-07-05 15:37:08 +02:00
|
|
|
secondChanceExceptionTaskEntry.setLabelText(Tr::tr("Second chance exceptions"));
|
2021-03-01 08:59:44 +01:00
|
|
|
|
|
|
|
|
ignoreFirstChanceAccessViolation.setSettingsKey(cdbSettingsGroup, "IgnoreFirstChanceAccessViolation");
|
2022-07-05 15:37:08 +02:00
|
|
|
ignoreFirstChanceAccessViolation.setLabelText(Tr::tr("Ignore first chance access violations"));
|
2013-05-22 00:49:51 -07:00
|
|
|
|
2009-03-25 12:30:13 +01:00
|
|
|
//
|
|
|
|
|
// Locals & Watchers
|
2021-03-01 08:59:44 +01:00
|
|
|
sortStructMembers.setSettingsKey(debugModeGroup, "SortStructMembers");
|
2022-07-05 15:37:08 +02:00
|
|
|
sortStructMembers.setDisplayName(Tr::tr("Sort Members of Classes and Structs Alphabetically"));
|
|
|
|
|
sortStructMembers.setLabelText(Tr::tr("Sort members of classes and structs alphabetically"));
|
2021-03-01 08:59:44 +01:00
|
|
|
sortStructMembers.setDefaultValue(true);
|
2010-09-23 11:15:56 +02:00
|
|
|
|
2009-03-18 10:04:02 +01:00
|
|
|
//
|
2009-03-19 09:32:09 +01:00
|
|
|
// Breakpoints
|
2009-03-18 10:04:02 +01:00
|
|
|
//
|
2022-07-05 15:37:08 +02:00
|
|
|
synchronizeBreakpoints.setLabelText(Tr::tr("Synchronize Breakpoints"));
|
2009-03-18 10:04:02 +01:00
|
|
|
|
2021-03-01 08:59:44 +01:00
|
|
|
autoQuit.setSettingsKey(debugModeGroup, "AutoQuit");
|
2022-07-05 15:37:08 +02:00
|
|
|
autoQuit.setLabelText(Tr::tr("Automatically Quit Debugger"));
|
2021-03-01 08:59:44 +01:00
|
|
|
|
|
|
|
|
useToolTipsInLocalsView.setSettingsKey(debugModeGroup, "UseToolTipsInLocalsView");
|
2022-07-05 15:37:08 +02:00
|
|
|
useToolTipsInLocalsView.setLabelText(Tr::tr("Use Tooltips in Locals View when Debugging"));
|
2023-02-27 13:33:15 +01:00
|
|
|
useToolTipsInLocalsView.setToolTip("<p>"
|
|
|
|
|
+ Tr::tr("Enables tooltips in the locals "
|
|
|
|
|
"view during debugging."));
|
2021-03-01 08:59:44 +01:00
|
|
|
|
|
|
|
|
useToolTipsInBreakpointsView.setSettingsKey(debugModeGroup, "UseToolTipsInBreakpointsView");
|
2022-07-05 15:37:08 +02:00
|
|
|
useToolTipsInBreakpointsView.setLabelText(Tr::tr("Use Tooltips in Breakpoints View when Debugging"));
|
2023-02-27 13:33:15 +01:00
|
|
|
useToolTipsInBreakpointsView.setToolTip("<p>"
|
|
|
|
|
+ Tr::tr("Enables tooltips in the breakpoints "
|
|
|
|
|
"view during debugging."));
|
2021-03-01 08:59:44 +01:00
|
|
|
|
|
|
|
|
useToolTipsInStackView.setSettingsKey(debugModeGroup, "UseToolTipsInStackView");
|
2022-07-05 15:37:08 +02:00
|
|
|
useToolTipsInStackView.setLabelText(Tr::tr("Use Tooltips in Stack View when Debugging"));
|
2023-02-27 13:33:15 +01:00
|
|
|
useToolTipsInStackView.setToolTip("<p>"
|
|
|
|
|
+ Tr::tr("Enables tooltips in the stack "
|
|
|
|
|
"view during debugging."));
|
2021-03-01 08:59:44 +01:00
|
|
|
useToolTipsInStackView.setDefaultValue(true);
|
|
|
|
|
|
|
|
|
|
allPluginBreakpoints.setSettingsKey(debugModeGroup, "AllPluginBreakpoints");
|
|
|
|
|
allPluginBreakpoints.setDefaultValue(true);
|
|
|
|
|
|
|
|
|
|
selectedPluginBreakpoints.setSettingsKey(debugModeGroup, "SelectedPluginBreakpoints");
|
|
|
|
|
|
|
|
|
|
noPluginBreakpoints.setSettingsKey(debugModeGroup, "NoPluginBreakpoints");
|
|
|
|
|
|
|
|
|
|
selectedPluginBreakpointsPattern.setSettingsKey(debugModeGroup, "SelectedPluginBreakpointsPattern");
|
|
|
|
|
selectedPluginBreakpointsPattern.setDefaultValue(QString(".*"));
|
|
|
|
|
|
2022-07-05 15:37:08 +02:00
|
|
|
expandStack.setLabelText(Tr::tr("Reload Full Stack"));
|
2009-04-06 17:27:15 +02:00
|
|
|
|
2022-07-05 15:37:08 +02:00
|
|
|
createFullBacktrace.setLabelText(Tr::tr("Create Full Backtrace"));
|
2010-03-29 18:44:02 +02:00
|
|
|
|
2012-04-18 14:20:54 +02:00
|
|
|
//
|
|
|
|
|
// QML Tools
|
|
|
|
|
//
|
2023-08-24 16:14:26 +02:00
|
|
|
const Key qmlInspectorGroup = "QML.Inspector";
|
2021-03-01 08:59:44 +01:00
|
|
|
showAppOnTop.setSettingsKey(qmlInspectorGroup, "QmlInspector.ShowAppOnTop");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Page 5
|
|
|
|
|
page5.registerAspect(&cdbAdditionalArguments);
|
|
|
|
|
page5.registerAspect(&cdbBreakEvents);
|
|
|
|
|
page5.registerAspect(&cdbBreakOnCrtDbgReport);
|
|
|
|
|
page5.registerAspect(&useCdbConsole);
|
|
|
|
|
page5.registerAspect(&cdbBreakPointCorrection);
|
|
|
|
|
page5.registerAspect(&cdbUsePythonDumper);
|
|
|
|
|
page5.registerAspect(&firstChanceExceptionTaskEntry);
|
|
|
|
|
page5.registerAspect(&secondChanceExceptionTaskEntry);
|
|
|
|
|
page5.registerAspect(&ignoreFirstChanceAccessViolation);
|
|
|
|
|
|
|
|
|
|
// Page 6
|
|
|
|
|
page6.registerAspect(&cdbSymbolPaths);
|
|
|
|
|
page6.registerAspect(&cdbSourcePaths);
|
|
|
|
|
|
|
|
|
|
// Pageless
|
|
|
|
|
all.registerAspect(&autoDerefPointers);
|
|
|
|
|
all.registerAspect(&useToolTipsInLocalsView);
|
|
|
|
|
all.registerAspect(&alwaysAdjustColumnWidths);
|
|
|
|
|
all.registerAspect(&useToolTipsInBreakpointsView);
|
|
|
|
|
all.registerAspect(&useToolTipsInStackView);
|
|
|
|
|
all.registerAspect(&logTimeStamps);
|
|
|
|
|
all.registerAspect(&sortStructMembers);
|
|
|
|
|
|
|
|
|
|
// Collect all
|
2021-03-04 08:03:49 +01:00
|
|
|
all.registerAspects(page5);
|
|
|
|
|
all.registerAspects(page6);
|
2021-03-01 08:59:44 +01:00
|
|
|
|
|
|
|
|
all.forEachAspect([](BaseAspect *aspect) {
|
|
|
|
|
aspect->setAutoApply(false);
|
|
|
|
|
// FIXME: Make the positioning part of the LayoutBuilder later
|
|
|
|
|
if (auto boolAspect = dynamic_cast<BoolAspect *>(aspect))
|
2023-05-23 17:49:52 +02:00
|
|
|
boolAspect->setLabelPlacement(BoolAspect::LabelPlacement::AtCheckBox);
|
2021-03-01 08:59:44 +01:00
|
|
|
});
|
2009-12-09 15:23:49 +01:00
|
|
|
|
2023-07-06 09:57:16 +02:00
|
|
|
all.readSettings();
|
2009-04-08 12:11:30 +02:00
|
|
|
|
2023-07-18 14:14:18 +02:00
|
|
|
QObject::connect(Core::ICore::instance(), &Core::ICore::saveSettingsRequested,
|
|
|
|
|
&all, &AspectContainer::writeSettings);
|
|
|
|
|
|
2009-03-19 10:54:27 +01:00
|
|
|
}
|
|
|
|
|
|
Debugger: Make most views per-engine instead of singletons
This is a step towards properly supporting multiple debugger
sessions side-by-side.
The combined C++-and-QML engine has been removed, instead a
combined setup creates now two individual engines, under a single
DebuggerRunTool but mostly independent with no combined state
machine. This requires a few more clicks in some cases, but
makes it easier to direct e.g. interrupt requests to the
interesting engine.
Care has been taken to not change the UX of the single debugger
session use case if possible. The fat debug button operates
as-before in that case, i.e. switches to Interrupt if the
single active runconfiguration runs in the debugger etc.
Most views are made per-engine, running an engine creates
a new Perspective, which is destroyed when the run control dies.
The snapshot view remains global and becomes primary source
of information on a "current engine" that receives all menu
and otherwise global input.
There is a new global "Breakpoint Preset" view containing
all "static" breakpoint data. When an engine starts up it
"claims" breakpoint it believes it can handle, but operates
on a copy of the static data. The markers of the static
version are suppressed as long as an engine controls a
breakpoint (that inclusive all resolved locations), but are
re-instatet once the engine quits.
The old Breakpoint class that already contained this split
per-instance was split into a new Breakpoint and a
GlobalBreakpoint class, with a per-engine model for Breakpoints,
and a singleton model containing GlobalBreakpoints.
There is a new CppDebuggerEngine intermediate level serving as
base for C++ (or, rather, "compiled") binary debugging, i.e.
{Gdb,Lldb,Cdb}Engine, taking over bits of the current DebuggerEngine
base that are not applicable to non-binary debuggers.
Change-Id: I9994f4c188379b4aee0c4f379edd4759fbb0bd43
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-07-31 12:30:48 +02:00
|
|
|
QString DebuggerSettings::dump()
|
2009-03-19 10:54:27 +01:00
|
|
|
{
|
2023-07-13 15:23:29 +02:00
|
|
|
QStringList msg;
|
|
|
|
|
settings().all.forEachAspect([&msg](BaseAspect *aspect) {
|
2023-08-24 16:14:26 +02:00
|
|
|
Key key = aspect->settingsKey();
|
2010-11-10 16:33:11 +01:00
|
|
|
if (!key.isEmpty()) {
|
2021-03-01 08:59:44 +01:00
|
|
|
const int pos = key.indexOf('/');
|
|
|
|
|
if (pos >= 0)
|
|
|
|
|
key = key.mid(pos);
|
2023-06-26 11:02:42 +02:00
|
|
|
const QString current = aspect->variantValue().toString();
|
|
|
|
|
const QString default_ = aspect->defaultVariantValue().toString();
|
2017-07-14 00:17:35 +03:00
|
|
|
QString setting = key + ": " + current + " (default: " + default_ + ')';
|
2010-11-10 16:33:11 +01:00
|
|
|
if (current != default_)
|
2017-07-14 00:17:35 +03:00
|
|
|
setting += " ***";
|
2023-07-13 15:23:29 +02:00
|
|
|
msg << setting;
|
2010-11-10 16:33:11 +01:00
|
|
|
}
|
2021-03-01 08:59:44 +01:00
|
|
|
});
|
2023-07-13 15:23:29 +02:00
|
|
|
msg.sort();
|
|
|
|
|
return "Debugger settings:\n" + msg.join('\n');
|
2009-03-19 10:54:27 +01:00
|
|
|
}
|
|
|
|
|
|
2022-07-05 15:37:08 +02:00
|
|
|
} // Debugger::Internal
|
2009-03-18 10:04:02 +01:00
|
|
|
|