Files
qt-creator/src/plugins/debugger/debuggeractions.h

192 lines
6.2 KiB
C
Raw Normal View History

/****************************************************************************
2009-03-18 10:04:02 +01:00
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
2009-03-18 10:04:02 +01:00
**
** This file is part of Qt Creator.
2009-03-18 10:04:02 +01:00
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
2009-03-18 10:04:02 +01:00
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
2010-12-17 16:01:08 +01:00
**
****************************************************************************/
2009-03-18 10:04:02 +01:00
#pragma once
2009-03-18 10:04:02 +01:00
#include <QCoreApplication>
#include <QHash>
#include <QMap>
#include <QVector>
#include <utils/aspects.h>
namespace Debugger {
namespace Internal {
using SourcePathMap = QMap<QString, QString>;
// Global debugger options that are not stored as saved action.
class GlobalDebuggerOptions
{
public:
void toSettings() const;
void fromSettings();
// Entries starting with '(' are considered regular expressions in the ElfReader.
// This is useful when there are multiple build machines with different
// path, and the user would like to match anything up to some known
// directory to his local project.
// Syntax: (/home/.*)/KnownSubdir -> /home/my/project
SourcePathMap sourcePathMap;
};
class GeneralSettings
{
GeneralSettings();
~GeneralSettings();
};
class DebuggerSettings
{
Q_DECLARE_TR_FUNCTIONS(Debugger::Internal::DebuggerSettings)
public:
explicit DebuggerSettings();
~DebuggerSettings();
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
static QString dump();
// Page 1: General
Utils::BoolAspect useAlternatingRowColors;
Utils::BoolAspect useAnnotationsInMainEditor;
Utils::BoolAspect useToolTipsInMainEditor;
Utils::BoolAspect closeSourceBuffersOnExit;
Utils::BoolAspect closeMemoryBuffersOnExit;
Utils::BoolAspect raiseOnInterrupt;
Utils::BoolAspect breakpointsFullPathByDefault;
Utils::BoolAspect warnOnReleaseBuilds;
Utils::IntegerAspect maximalStackDepth;
Utils::BoolAspect fontSizeFollowsEditor;
Utils::BoolAspect switchModeOnExit;
Utils::BoolAspect showQmlObjectTree;
Utils::BoolAspect stationaryEditorWhileStepping;
// Page 2: GDB
Utils::IntegerAspect gdbWatchdogTimeout;
Utils::BoolAspect skipKnownFrames;
Utils::BoolAspect useMessageBoxForSignals;
Utils::BoolAspect adjustBreakpointLocations;
Utils::BoolAspect useDynamicType;
Utils::BoolAspect loadGdbInit;
Utils::BoolAspect loadGdbDumpers;
Utils::BoolAspect intelFlavor;
Utils::BoolAspect usePseudoTracepoints;
Utils::StringAspect gdbStartupCommands;
Utils::StringAspect gdbPostAttachCommands;
// Page 3: GDB Extended
Utils::BoolAspect targetAsync;
Utils::BoolAspect autoEnrichParameters;
Utils::BoolAspect breakOnThrow;
Utils::BoolAspect breakOnCatch;
Utils::BoolAspect breakOnWarning;
Utils::BoolAspect breakOnFatal;
Utils::BoolAspect breakOnAbort;
Utils::BoolAspect enableReverseDebugging;
Utils::BoolAspect multiInferior;
// Page 4: Locals and expressions
Utils::BoolAspect useDebuggingHelpers;
Utils::BoolAspect useCodeModel;
Utils::BoolAspect showThreadNames;
Utils::StringAspect extraDumperFile; // For loading a file. Recommended.
Utils::StringAspect extraDumperCommands; // To modify an existing setup.
Utils::BoolAspect showStdNamespace;
Utils::BoolAspect showQtNamespace;
Utils::BoolAspect showQObjectNames;
// Page 5: CDB
Utils::StringAspect cdbAdditionalArguments;
Utils::StringListAspect cdbBreakEvents;
Utils::BoolAspect cdbBreakOnCrtDbgReport;
Utils::BoolAspect useCdbConsole;
Utils::BoolAspect cdbBreakPointCorrection;
Utils::BoolAspect cdbUsePythonDumper;
Utils::BoolAspect firstChanceExceptionTaskEntry;
Utils::BoolAspect secondChanceExceptionTaskEntry;
Utils::BoolAspect ignoreFirstChanceAccessViolation;
Utils::BoolAspect *registerForPostMortem = nullptr;
// Page 6: CDB Paths
Utils::StringListAspect cdbSymbolPaths;
Utils::StringListAspect cdbSourcePaths;
// Without pages
Utils::BoolAspect alwaysAdjustColumnWidths;
Utils::BaseAspect settingsDialog;
Utils::BoolAspect autoQuit;
Utils::BoolAspect lockView;
Utils::BoolAspect logTimeStamps;
2009-03-18 10:04:02 +01:00
// Stack
Utils::BaseAspect expandStack;
Utils::BaseAspect createFullBacktrace;
Utils::BoolAspect useToolTipsInStackView;
2009-03-18 10:04:02 +01:00
// Watchers & Locals
Utils::BoolAspect autoDerefPointers;
Utils::IntegerAspect maximalStringLength;
Utils::IntegerAspect displayStringLimit;
Utils::BoolAspect sortStructMembers;
Utils::BoolAspect useToolTipsInLocalsView;
2009-03-18 10:04:02 +01:00
// Breakpoints
Utils::BoolAspect synchronizeBreakpoints; // ?
Utils::BoolAspect allPluginBreakpoints;
Utils::BoolAspect selectedPluginBreakpoints;
Utils::BoolAspect noPluginBreakpoints;
Utils::StringAspect selectedPluginBreakpointsPattern;
Utils::BoolAspect useToolTipsInBreakpointsView;
// QML Tools
Utils::BoolAspect showAppOnTop;
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
void readSettings();
void writeSettings() const;
private:
DebuggerSettings(const DebuggerSettings &) = delete;
DebuggerSettings &operator=(const DebuggerSettings &) = delete;
};
2009-03-18 10:04:02 +01:00
DebuggerSettings *debuggerSettings();
///////////////////////////////////////////////////////////
2009-03-18 10:04:02 +01:00
} // namespace Internal
} // namespace Debugger