debuggerconstants.h 7.29 KB
Newer Older
1
/**************************************************************************
con's avatar
con committed
2 3 4
**
** This file is part of Qt Creator
**
hjk's avatar
hjk committed
5
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
con's avatar
con committed
6
**
7
** Contact: Nokia Corporation (qt-info@nokia.com)
con's avatar
con committed
8
**
9
**
10
** GNU Lesser General Public License Usage
11
**
hjk's avatar
hjk committed
12 13 14 15 16 17
** This file may be used under the terms of the GNU Lesser General Public
** License version 2.1 as published by the Free Software Foundation and
** appearing in the file LICENSE.LGPL included in the packaging of this file.
** Please review the following information to ensure the GNU Lesser General
** Public License version 2.1 requirements will be met:
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
18
**
con's avatar
con committed
19
** In addition, as a special exception, Nokia gives you certain additional
hjk's avatar
hjk committed
20
** rights. These rights are described in the Nokia Qt LGPL Exception
con's avatar
con committed
21 22
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
hjk's avatar
hjk committed
23 24 25 26 27
** Other Usage
**
** Alternatively, this file may be used in accordance with the terms and
** conditions contained in a signed written agreement between you and Nokia.
**
con's avatar
con committed
28
** If you have questions regarding the use of this file, please contact
29
** Nokia at qt-info@nokia.com.
con's avatar
con committed
30
**
31
**************************************************************************/
hjk's avatar
hjk committed
32

con's avatar
con committed
33 34 35
#ifndef DEBUGGERCONSTANTS_H
#define DEBUGGERCONSTANTS_H

36
#include <QtCore/QFlags>
37

con's avatar
con committed
38 39 40
namespace Debugger {
namespace Constants {

41
// Debug mode
42
const char MODE_DEBUG[]             = "Mode.Debug";
43

44
// Contexts
45 46 47
const char C_DEBUGMODE[]            = "Debugger.DebugMode";
const char C_CPPDEBUGGER[]          = "Gdb Debugger";
const char C_QMLDEBUGGER[]          = "Qml/JavaScript Debugger";
48

49
// Menu Groups
50
const char G_START_LOCAL[]          = "Debugger.Group.Start.Local";
51 52
const char G_MANUAL_REMOTE[]        = "Debugger.Group.Manual.Remote";
const char G_AUTOMATIC_REMOTE[]     = "Debugger.Group.Automatic.Remote";
53
const char G_START_QML[]            = "Debugger.Group.Start.Qml";
54

55
// Common actions (accessed by QML inspector)
56 57 58
const char INTERRUPT[]              = "Debugger.Interrupt";
const char CONTINUE[]               = "Debugger.Continue";
const char STOP[]                   = "Debugger.Stop";
hjk's avatar
hjk committed
59
const char HIDDEN_STOP[]            = "Debugger.HiddenStop";
hjk's avatar
hjk committed
60
const char ABORT[]                  = "Debugger.Abort";
61 62 63 64 65
const char STEP[]                   = "Debugger.StepLine";
const char STEPOUT[]                = "Debugger.StepOut";
const char NEXT[]                   = "Debugger.NextLine";
const char REVERSE[]                = "Debugger.ReverseDirection";
const char OPERATE_BY_INSTRUCTION[] = "Debugger.OperateByInstruction";
con's avatar
con committed
66

67
// DebuggerMainWindow dock widget names
68 69 70 71 72 73 74 75 76 77 78 79 80
const char DOCKWIDGET_BREAK[]        = "Debugger.Docks.Break";
const char DOCKWIDGET_MODULES[]      = "Debugger.Docks.Modules";
const char DOCKWIDGET_REGISTER[]     = "Debugger.Docks.Register";
const char DOCKWIDGET_OUTPUT[]       = "Debugger.Docks.Output";
const char DOCKWIDGET_SNAPSHOTS[]    = "Debugger.Docks.Snapshots";
const char DOCKWIDGET_STACK[]        = "Debugger.Docks.Stack";
const char DOCKWIDGET_SOURCE_FILES[] = "Debugger.Docks.SourceFiles";
const char DOCKWIDGET_THREADS[]      = "Debugger.Docks.Threads";
const char DOCKWIDGET_WATCHERS[]     = "Debugger.Docks.LocalsAndWatchers";

const char DOCKWIDGET_QML_INSPECTOR[]     = "Debugger.Docks.QmlInspector";
const char DOCKWIDGET_QML_SCRIPTCONSOLE[] = "Debugger.Docks.ScriptConsole";
const char DOCKWIDGET_DEFAULT_AREA[]      = "Debugger.Docks.DefaultArea";
81

con's avatar
con committed
82
} // namespace Constants
hjk's avatar
hjk committed
83

con's avatar
con committed
84
enum DebuggerState
hjk's avatar
hjk committed
85 86 87
{
    DebuggerNotReady,          // Debugger not started

hjk's avatar
hjk committed
88
    EngineSetupRequested,      // Engine starts
89 90
    EngineSetupFailed,
    EngineSetupOk,
91

hjk's avatar
hjk committed
92
    InferiorSetupRequested,
hjk's avatar
hjk committed
93
    InferiorSetupFailed,
94
    InferiorSetupOk,
hjk's avatar
hjk committed
95

hjk's avatar
hjk committed
96 97
    EngineRunRequested,
    EngineRunFailed,
98

hjk's avatar
hjk committed
99
    InferiorUnrunnable,        // Used in the core dump adapter
hjk's avatar
hjk committed
100

hjk's avatar
hjk committed
101 102 103
    InferiorRunRequested,      // Debuggee requested to run
    InferiorRunOk,             // Debuggee running
    InferiorRunFailed,         // Debuggee running
hjk's avatar
hjk committed
104

hjk's avatar
hjk committed
105 106 107 108
    InferiorStopRequested,     // Debuggee running, stop requested
    InferiorStopOk,            // Debuggee stopped
    InferiorStopFailed,        // Debuggee not stopped, will kill debugger

109 110
    InferiorExitOk,

hjk's avatar
hjk committed
111
    InferiorShutdownRequested,
hjk's avatar
hjk committed
112
    InferiorShutdownFailed,
113
    InferiorShutdownOk,
hjk's avatar
hjk committed
114

hjk's avatar
hjk committed
115 116
    EngineShutdownRequested,
    EngineShutdownFailed,
117
    EngineShutdownOk,
hjk's avatar
hjk committed
118 119

    DebuggerFinished
hjk's avatar
hjk committed
120 121 122 123 124 125 126 127 128 129
};

enum DebuggerStartMode
{
    NoStartMode,
    StartInternal,         // Start current start project's binary
    StartExternal,         // Start binary found in file system
    AttachExternal,        // Attach to running process by process id
    AttachCrashedExternal, // Attach to crashed process by process id
    AttachCore,            // Attach to a core file
130 131 132
    AttachToRemoteServer,  // Attach to a running gdbserver
    AttachToRemoteProcess, // Attach to a running remote process
    StartRemoteProcess,    // Start and attach to a remote process
133 134
    StartRemoteGdb,        // Start gdb itself remotely
    StartRemoteEngine      // Start ipc guest engine on other machine
hjk's avatar
hjk committed
135 136
};

137 138 139 140 141
enum DebuggerCapabilities
{
    ReverseSteppingCapability = 0x1,
    SnapshotCapability = 0x2,
    AutoDerefPointersCapability = 0x4,
142
    DisassemblerCapability = 0x8,
143 144 145 146 147
    RegisterCapability = 0x10,
    ShowMemoryCapability = 0x20,
    JumpToLineCapability = 0x40,
    ReloadModuleCapability = 0x80,
    ReloadModuleSymbolsCapability = 0x100,
148
    BreakOnThrowAndCatchCapability = 0x200,
149 150
    BreakConditionCapability = 0x400, //!< Conditional Breakpoints
    BreakModuleCapability = 0x800, //!< Breakpoint specification includes module
151
    TracePointCapability = 0x1000,
152 153 154
    ReturnFromFunctionCapability = 0x2000,
    CreateFullBacktraceCapability = 0x4000,
    AddWatcherCapability = 0x8000,
155 156 157 158 159 160 161 162
    AddWatcherWhileRunningCapability = 0x10000,
    WatchWidgetsCapability = 0x20000,
    WatchpointByAddressCapability = 0x40000,
    WatchpointByExpressionCapability = 0x80000,
    ShowModuleSymbolsCapability = 0x100000,
    CatchCapability = 0x200000, //!< fork, vfork, syscall
    OperateByInstructionCapability = 0x400000,
    RunToLineCapability = 0x800000,
163
    MemoryAddressCapability = 0x1000000
164 165
};

hjk's avatar
hjk committed
166 167
enum LogChannel
{
168 169
    LogInput,                // Used for user input
    LogMiscInput,            // Used for misc stuff in the input pane
hjk's avatar
hjk committed
170 171 172
    LogOutput,
    LogWarning,
    LogError,
173 174
    LogStatus,               // Used for status changed messages
    LogTime,                 // Used for time stamp messages
hjk's avatar
hjk committed
175 176
    LogDebug,
    LogMisc,
177 178 179
    AppOutput,               // stdout
    AppError,                // stderr
    AppStuff,                // (possibly) windows debug channel
180 181
    StatusBar,                // LogStatus and also put to the status bar
    ScriptConsoleOutput
hjk's avatar
hjk committed
182 183
};

184 185 186 187 188 189 190 191
enum DebuggerEngineType
{
    NoEngineType      = 0,
    GdbEngineType     = 0x01,
    ScriptEngineType  = 0x02,
    CdbEngineType     = 0x04,
    PdbEngineType     = 0x08,
    QmlEngineType     = 0x20,
192
    QmlCppEngineType  = 0x40,
hjk's avatar
hjk committed
193
    LldbEngineType  = 0x80,
194 195 196 197 198
    AllEngineTypes = GdbEngineType
        | ScriptEngineType
        | CdbEngineType
        | PdbEngineType
        | QmlEngineType
199
        | QmlCppEngineType
hjk's avatar
hjk committed
200
        | LldbEngineType
201 202 203 204
};

enum DebuggerLanguage
{
205 206 207
    AnyLanguage       = 0x0,
    CppLanguage      = 0x1,
    QmlLanguage      = 0x2
208
};
209
Q_DECLARE_FLAGS(DebuggerLanguages, DebuggerLanguage)
210

con's avatar
con committed
211 212 213
} // namespace Debugger

#endif // DEBUGGERCONSTANTS_H