1 /**************************************************************************
3 ** This file is part of Qt Creator
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
7 ** Contact: Nokia Corporation (info@qt.nokia.com)
10 ** GNU Lesser General Public License Usage
12 ** This file may be used under the terms of the GNU Lesser General Public
13 ** License version 2.1 as published by the Free Software Foundation and
14 ** appearing in the file LICENSE.LGPL included in the packaging of this file.
15 ** Please review the following information to ensure the GNU Lesser General
16 ** Public License version 2.1 requirements will be met:
17 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
19 ** In addition, as a special exception, Nokia gives you certain additional
20 ** rights. These rights are described in the Nokia Qt LGPL Exception
21 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
25 ** Alternatively, this file may be used in accordance with the terms and
26 ** conditions contained in a signed written agreement between you and Nokia.
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
31 **************************************************************************/
33 #ifndef DEBUGGERCONSTANTS_H
34 #define DEBUGGERCONSTANTS_H
36 #include <QtCore/QtGlobal>
41 // modes and their priorities
42 const char * const MODE_DEBUG = "Debugger.Mode.Debug";
43 const int P_MODE_DEBUG = 85;
46 const char * const INTERRUPT = "Debugger.Interrupt";
47 const char * const CONTINUE = "Debugger.Continue";
48 const char * const STOP = "Debugger.Stop";
49 const char * const RESET = "Debugger.Reset";
50 const char * const STEP = "Debugger.StepLine";
51 const char * const STEPOUT = "Debugger.StepOut";
52 const char * const NEXT = "Debugger.NextLine";
53 const char * const REVERSE = "Debugger.ReverseDirection";
54 const char * const OPERATE_BY_INSTRUCTION = "Debugger.OperateByInstruction";
56 const char * const M_DEBUG_VIEWS = "Debugger.Menu.View.Debug";
58 const char * const C_DEBUGMODE = "Debugger.DebugMode";
59 const char * const C_CPPDEBUGGER = "Gdb Debugger";
60 const char * const C_QMLDEBUGGER = "Qml/JavaScript Debugger";
62 const char * const DEBUGGER_COMMON_SETTINGS_ID = "A.Common";
63 const char * const DEBUGGER_COMMON_SETTINGS_NAME =
64 QT_TRANSLATE_NOOP("Debugger", "General");
65 const char * const DEBUGGER_SETTINGS_CATEGORY = "O.Debugger";
66 const char * const DEBUGGER_SETTINGS_TR_CATEGORY =
67 QT_TRANSLATE_NOOP("Debugger", "Debugger");
68 const char * const DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON =
69 ":/core/images/category_debug.png";
72 const char * const DOCKWIDGET_BREAK = "Debugger.Docks.Break";
73 const char * const DOCKWIDGET_CONSOLE = "Debugger.Docks.Console";
74 const char * const DOCKWIDGET_MODULES = "Debugger.Docks.Modules";
75 const char * const DOCKWIDGET_REGISTER = "Debugger.Docks.Register";
76 const char * const DOCKWIDGET_OUTPUT = "Debugger.Docks.Output";
77 const char * const DOCKWIDGET_SNAPSHOTS = "Debugger.Docks.Snapshots";
78 const char * const DOCKWIDGET_STACK = "Debugger.Docks.Stack";
79 const char * const DOCKWIDGET_SOURCE_FILES = "Debugger.Docks.SourceFiles";
80 const char * const DOCKWIDGET_THREADS = "Debugger.Docks.Threads";
81 const char * const DOCKWIDGET_WATCHERS = "Debugger.Docks.LocalsAndWatchers";
83 const char * const DOCKWIDGET_QML_INSPECTOR = "Debugger.Docks.QmlInspector";
84 const char * const DOCKWIDGET_QML_SCRIPTCONSOLE = "Debugger.Docks.ScriptConsole";
85 const char * const DOCKWIDGET_DEFAULT_AREA = "Debugger.Docks.DefaultArea";
89 } // namespace Internal
91 const char * const OPENED_BY_DEBUGGER = "OpenedByDebugger";
92 const char * const OPENED_WITH_DISASSEMBLY = "DisassemblerView";
93 const char * const OPENED_WITH_MEMORY = "MemoryView";
95 const char * const DEBUGMODE = "Debugger.DebugMode";
96 const char * const DEBUG = "Debugger.Debug";
97 const int P_ACTION_DEBUG = 90; //priority for the modemanager
99 const char * const DEBUG_KEY = "Ctrl+Y";
101 const char * const DEBUG_KEY = "F5";
104 } // namespace Constants
109 DebuggerNotReady, // Debugger not started
111 EngineSetupRequested, // Engine starts
115 InferiorSetupRequested,
122 InferiorUnrunnable, // Used in the core dump adapter
124 InferiorRunRequested, // Debuggee requested to run
125 InferiorRunOk, // Debuggee running
126 InferiorRunFailed, // Debuggee running
128 InferiorStopRequested, // Debuggee running, stop requested
129 InferiorStopOk, // Debuggee stopped
130 InferiorStopFailed, // Debuggee not stopped, will kill debugger
134 InferiorShutdownRequested,
135 InferiorShutdownFailed,
138 EngineShutdownRequested,
139 EngineShutdownFailed,
145 enum DebuggerStartMode
148 StartInternal, // Start current start project's binary
149 StartExternal, // Start binary found in file system
150 AttachExternal, // Attach to running process by process id
151 AttachCrashedExternal, // Attach to crashed process by process id
152 AttachTcf, // Attach to a running Target Communication Framework agent
153 AttachCore, // Attach to a core file
154 AttachToRemote, // Start and attach to a remote process
155 StartRemoteGdb, // Start gdb itself remotely
156 StartRemoteEngine // Start ipc guest engine on other machine
159 enum DebuggerCapabilities
161 ReverseSteppingCapability = 0x1,
162 SnapshotCapability = 0x2,
163 AutoDerefPointersCapability = 0x4,
164 DisassemblerCapability = 0x8,
165 RegisterCapability = 0x10,
166 ShowMemoryCapability = 0x20,
167 JumpToLineCapability = 0x40,
168 ReloadModuleCapability = 0x80,
169 ReloadModuleSymbolsCapability = 0x100,
170 BreakOnThrowAndCatchCapability = 0x200,
171 BreakConditionCapability = 0x400, //!< Conditional Breakpoints
172 BreakModuleCapability = 0x800, //!< Breakpoint specification includes module
173 TracePointCapability = 0x1000,
174 ReturnFromFunctionCapability = 0x2000,
175 CreateFullBacktraceCapability = 0x4000,
176 AddWatcherCapability = 0x8000,
177 WatchpointCapability = 0x10000,
178 ShowModuleSymbolsCapability = 0x20000,
179 CatchCapability = 0x40000, //!< fork, vfork, syscall
180 AllDebuggerCapabilities = 0xFFFFFFFF
185 LogInput, // Used for user input
186 LogMiscInput, // Used for misc stuff in the input pane
190 LogStatus, // Used for status changed messages
191 LogTime, // Used for time stamp messages
197 StatusBar, // LogStatus and also put to the status bar
203 DisplaySourceRole = 32, // Qt::UserRole
206 EngineCapabilitiesRole,
207 EngineActionsEnabledRole,
208 RequestActivationRole,
209 RequestContextMenuRole,
211 // Locals and Watchers
213 LocalsEditTypeRole, // A QVariant::type describing the item
214 LocalsIntegerBaseRole, // Number base 16, 10, 8, 2
215 LocalsExpressionRole,
216 LocalsRawExpressionRole,
217 LocalsExpandedRole, // The preferred expanded state to the view
218 LocalsTypeFormatListRole,
219 LocalsTypeFormatRole, // Used to communicate alternative formats to the view
220 LocalsIndividualFormatRole,
221 LocalsAddressRole, // Memory address of variable as quint64
222 LocalsRawValueRole, // Unformatted value as string
223 LocalsPointerValueRole, // Pointer value (address) as quint64
224 LocalsIsWatchpointAtAddressRole,
225 LocalsIsWatchpointAtPointerValueRole,
228 SnapshotCapabilityRole
231 enum DebuggerEngineType
234 GdbEngineType = 0x01,
235 ScriptEngineType = 0x02,
236 CdbEngineType = 0x04,
237 PdbEngineType = 0x08,
238 TcfEngineType = 0x10,
239 QmlEngineType = 0x20,
240 QmlCppEngineType = 0x40,
241 LldbEngineType = 0x80,
242 AllEngineTypes = GdbEngineType
252 enum DebuggerLanguage
258 Q_DECLARE_FLAGS(DebuggerLanguages, DebuggerLanguage)
260 } // namespace Debugger
262 #endif // DEBUGGERCONSTANTS_H