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
|
2008-12-02 15:08:31 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QFlags>
|
2009-04-17 09:03:32 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
namespace Debugger {
|
|
|
|
namespace Constants {
|
|
|
|
|
2011-04-21 15:52:51 +02:00
|
|
|
// Debug mode
|
2011-07-15 10:55:39 +02:00
|
|
|
const char MODE_DEBUG[] = "Mode.Debug";
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2019-02-18 15:49:05 +01:00
|
|
|
// Debug mode context
|
2011-07-15 10:55:39 +02:00
|
|
|
const char C_DEBUGMODE[] = "Debugger.DebugMode";
|
2013-03-27 13:03:15 +01:00
|
|
|
|
2024-01-12 14:04:37 +01:00
|
|
|
const char DEBUGGER_RUN_FACTORY[] = "RunWorkerFactory.DebuggerRunWorkerFactory";
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
} // namespace Constants
|
2009-09-25 08:35:31 +02:00
|
|
|
|
2014-06-02 17:05:52 +02:00
|
|
|
// Keep in sync with dumper.py
|
2009-09-25 08:35:31 +02:00
|
|
|
enum DebuggerStartMode
|
|
|
|
{
|
|
|
|
NoStartMode,
|
2021-01-06 16:56:36 +01:00
|
|
|
StartInternal, // Start current start project's binary
|
|
|
|
StartExternal, // Start binary found in file system
|
|
|
|
AttachToLocalProcess, // Attach to running local process by process id
|
|
|
|
AttachToCrashedProcess, // Attach to crashed process by process id
|
|
|
|
AttachToCore, // Attach to a core file
|
|
|
|
AttachToRemoteServer, // Attach to a running gdbserver
|
|
|
|
AttachToRemoteProcess, // Attach to a running remote process
|
|
|
|
AttachToQmlServer, // Attach to a running QmlServer
|
|
|
|
StartRemoteProcess // Start and attach to a remote process
|
2009-09-25 08:35:31 +02:00
|
|
|
};
|
|
|
|
|
2012-03-26 16:03:25 +02:00
|
|
|
enum DebuggerCloseMode
|
|
|
|
{
|
|
|
|
KillAtClose,
|
2014-10-09 00:13:33 +02:00
|
|
|
KillAndExitMonitorAtClose,
|
2012-03-26 16:03:25 +02:00
|
|
|
DetachAtClose
|
|
|
|
};
|
|
|
|
|
2010-02-05 10:23:55 +01:00
|
|
|
enum DebuggerCapabilities
|
|
|
|
{
|
2015-07-07 15:06:22 +02:00
|
|
|
ReverseSteppingCapability = 1 << 0,
|
|
|
|
SnapshotCapability = 1 << 1,
|
|
|
|
AutoDerefPointersCapability = 1 << 2,
|
|
|
|
DisassemblerCapability = 1 << 3,
|
|
|
|
RegisterCapability = 1 << 4,
|
|
|
|
ShowMemoryCapability = 1 << 5,
|
|
|
|
JumpToLineCapability = 1 << 6,
|
|
|
|
ReloadModuleCapability = 1 << 7,
|
|
|
|
ReloadModuleSymbolsCapability = 1 << 8,
|
|
|
|
BreakOnThrowAndCatchCapability = 1 << 9,
|
|
|
|
BreakConditionCapability = 1 << 10, //!< Conditional Breakpoints
|
|
|
|
BreakModuleCapability = 1 << 11, //!< Breakpoint specification includes module
|
|
|
|
TracePointCapability = 1 << 12,
|
|
|
|
ReturnFromFunctionCapability = 1 << 13,
|
|
|
|
CreateFullBacktraceCapability = 1 << 14,
|
|
|
|
AddWatcherCapability = 1 << 15,
|
|
|
|
AddWatcherWhileRunningCapability = 1 << 16,
|
|
|
|
WatchWidgetsCapability = 1 << 17,
|
|
|
|
WatchpointByAddressCapability = 1 << 18,
|
|
|
|
WatchpointByExpressionCapability = 1 << 19,
|
|
|
|
ShowModuleSymbolsCapability = 1 << 20,
|
|
|
|
CatchCapability = 1 << 21, //!< fork, vfork, syscall
|
|
|
|
OperateByInstructionCapability = 1 << 22,
|
|
|
|
RunToLineCapability = 1 << 23,
|
|
|
|
MemoryAddressCapability = 1 << 24,
|
|
|
|
ShowModuleSectionsCapability = 1 << 25,
|
|
|
|
WatchComplexExpressionsCapability = 1 << 26, // Used to filter out challenges for cdb.
|
|
|
|
AdditionalQmlStackCapability = 1 << 27, //!< C++ debugger engine is able to retrieve QML stack as well.
|
|
|
|
ResetInferiorCapability = 1 << 28, //!< restart program while debugging
|
2018-11-18 20:13:06 +02:00
|
|
|
BreakIndividualLocationsCapability= 1 << 29 //!< Allows to enable/disable individual location for multi-location bps
|
2010-02-05 10:23:55 +01:00
|
|
|
};
|
|
|
|
|
2009-09-25 08:35:31 +02:00
|
|
|
enum LogChannel
|
|
|
|
{
|
2010-06-16 11:08:54 +02:00
|
|
|
LogInput, // Used for user input
|
|
|
|
LogMiscInput, // Used for misc stuff in the input pane
|
2010-07-09 17:07:59 +02:00
|
|
|
LogOutput,
|
|
|
|
LogWarning,
|
|
|
|
LogError,
|
2010-06-16 11:08:54 +02:00
|
|
|
LogStatus, // Used for status changed messages
|
|
|
|
LogTime, // Used for time stamp messages
|
2010-07-09 17:07:59 +02:00
|
|
|
LogDebug,
|
|
|
|
LogMisc,
|
2011-05-11 12:08:23 +02:00
|
|
|
AppOutput, // stdout
|
|
|
|
AppError, // stderr
|
|
|
|
AppStuff, // (possibly) windows debug channel
|
2012-10-04 14:54:59 +02:00
|
|
|
StatusBar, // LogStatus and also put to the status bar
|
|
|
|
ConsoleOutput // Used to output to console
|
2010-07-09 17:07:59 +02:00
|
|
|
};
|
|
|
|
|
2014-10-28 09:35:06 +01:00
|
|
|
// Keep values compatible between Qt Creator versions,
|
|
|
|
// because they are used by the installer for registering debuggers
|
2010-06-16 11:08:54 +02:00
|
|
|
enum DebuggerEngineType
|
|
|
|
{
|
|
|
|
NoEngineType = 0,
|
2013-03-22 10:28:49 +01:00
|
|
|
GdbEngineType = 0x001,
|
|
|
|
CdbEngineType = 0x004,
|
2020-01-24 17:08:27 +03:00
|
|
|
LldbEngineType = 0x100,
|
2024-06-14 11:23:42 +02:00
|
|
|
GdbDapEngineType = 0x200,
|
|
|
|
LldbDapEngineType = 0x400,
|
2020-01-24 17:08:27 +03:00
|
|
|
UvscEngineType = 0x1000
|
2010-08-18 13:54:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
enum DebuggerLanguage
|
|
|
|
{
|
2016-03-01 07:51:06 +01:00
|
|
|
NoLanguage = 0x0,
|
2010-08-24 17:17:54 +02:00
|
|
|
CppLanguage = 0x1,
|
2016-03-01 07:51:06 +01:00
|
|
|
QmlLanguage = 0x2,
|
|
|
|
AnyLanguage = CppLanguage | QmlLanguage
|
2010-06-15 09:13:22 +02:00
|
|
|
};
|
2016-03-01 07:51:06 +01:00
|
|
|
|
2010-08-18 13:54:12 +02:00
|
|
|
Q_DECLARE_FLAGS(DebuggerLanguages, DebuggerLanguage)
|
2010-06-15 09:13:22 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
} // namespace Debugger
|