2009-02-25 09:15:00 +01:00
|
|
|
/**************************************************************************
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
**
|
2011-01-11 16:28:15 +01:00
|
|
|
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2009-06-17 00:01:27 +10:00
|
|
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** No Commercial Usage
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** This file contains pre-release code and may not be distributed.
|
|
|
|
** You may use this file in accordance with the terms and conditions
|
|
|
|
** contained in the Technology Preview License Agreement accompanying
|
|
|
|
** this package.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** GNU Lesser General Public License Usage
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** Alternatively, 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.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** In addition, as a special exception, Nokia gives you certain additional
|
|
|
|
** rights. These rights are described in the Nokia Qt LGPL Exception
|
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
**
|
|
|
|
** If you have questions regarding the use of this file, please contact
|
|
|
|
** Nokia at qt-info@nokia.com.
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
**************************************************************************/
|
2008-12-02 15:08:31 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
#ifndef DEBUGGERCONSTANTS_H
|
|
|
|
#define DEBUGGERCONSTANTS_H
|
|
|
|
|
2010-03-18 10:59:06 +01:00
|
|
|
#include <QtCore/QtGlobal>
|
2009-04-17 09:03:32 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
namespace Debugger {
|
|
|
|
namespace Constants {
|
|
|
|
|
|
|
|
// modes and their priorities
|
|
|
|
const char * const MODE_DEBUG = "Debugger.Mode.Debug";
|
|
|
|
const int P_MODE_DEBUG = 85;
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
// common actions
|
2010-08-18 13:54:12 +02:00
|
|
|
const char * const STOP = "Debugger.Interrupt";
|
2008-12-02 12:01:29 +01:00
|
|
|
const char * const RESET = "Debugger.Reset";
|
|
|
|
const char * const STEP = "Debugger.StepLine";
|
|
|
|
const char * const STEPOUT = "Debugger.StepOut";
|
|
|
|
const char * const NEXT = "Debugger.NextLine";
|
2009-05-25 17:19:42 +02:00
|
|
|
const char * const REVERSE = "Debugger.ReverseDirection";
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-12-03 15:03:51 +01:00
|
|
|
const char * const M_DEBUG_VIEWS = "Debugger.Menu.View.Debug";
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-08-18 13:54:12 +02:00
|
|
|
const char * const C_DEBUGMODE = "Debugger.DebugMode";
|
2010-03-23 18:12:03 +01:00
|
|
|
const char * const C_CPPDEBUGGER = "Gdb Debugger";
|
2010-09-22 14:16:29 +02:00
|
|
|
const char * const C_QMLDEBUGGER = "Qml/JavaScript Debugger";
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2009-11-27 16:12:12 +01:00
|
|
|
const char * const DEBUGGER_COMMON_SETTINGS_ID = "A.Common";
|
2010-02-15 16:02:41 +01:00
|
|
|
const char * const DEBUGGER_COMMON_SETTINGS_NAME =
|
2010-04-06 16:42:24 +02:00
|
|
|
QT_TRANSLATE_NOOP("Debugger", "General");
|
2009-11-27 16:12:12 +01:00
|
|
|
const char * const DEBUGGER_SETTINGS_CATEGORY = "O.Debugger";
|
2010-02-15 16:02:41 +01:00
|
|
|
const char * const DEBUGGER_SETTINGS_TR_CATEGORY =
|
|
|
|
QT_TRANSLATE_NOOP("Debugger", "Debugger");
|
2010-03-26 17:34:10 +01:00
|
|
|
const char * const DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON =
|
|
|
|
":/core/images/category_debug.png";
|
2009-04-17 09:03:32 +02:00
|
|
|
|
2010-08-18 13:54:12 +02:00
|
|
|
// dock widget names
|
2010-12-03 15:03:51 +01:00
|
|
|
const char * const DOCKWIDGET_BREAK = "Debugger.Docks.Break";
|
|
|
|
const char * const DOCKWIDGET_CONSOLE = "Debugger.Docks.Console";
|
|
|
|
const char * const DOCKWIDGET_MODULES = "Debugger.Docks.Modules";
|
|
|
|
const char * const DOCKWIDGET_REGISTER = "Debugger.Docks.Register";
|
|
|
|
const char * const DOCKWIDGET_OUTPUT = "Debugger.Docks.Output";
|
|
|
|
const char * const DOCKWIDGET_SNAPSHOTS = "Debugger.Docks.Snapshots";
|
|
|
|
const char * const DOCKWIDGET_STACK = "Debugger.Docks.Stack";
|
2010-08-24 17:17:54 +02:00
|
|
|
const char * const DOCKWIDGET_SOURCE_FILES = "Debugger.Docks.SourceFiles";
|
2010-12-03 15:03:51 +01:00
|
|
|
const char * const DOCKWIDGET_THREADS = "Debugger.Docks.Threads";
|
|
|
|
const char * const DOCKWIDGET_WATCHERS = "Debugger.Docks.LocalsAndWatchers";
|
2010-08-24 17:17:54 +02:00
|
|
|
|
|
|
|
const char * const DOCKWIDGET_QML_INSPECTOR = "Debugger.Docks.QmlInspector";
|
2010-08-26 16:02:41 +02:00
|
|
|
const char * const DOCKWIDGET_QML_SCRIPTCONSOLE = "Debugger.Docks.ScriptConsole";
|
2010-12-06 10:25:33 +01:00
|
|
|
const char * const DOCKWIDGET_DEFAULT_AREA = "Debugger.Docks.DefaultArea";
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2009-03-03 14:01:58 +01:00
|
|
|
namespace Internal {
|
|
|
|
enum { debug = 0 };
|
2010-02-15 16:02:41 +01:00
|
|
|
} // namespace Internal
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2010-10-25 13:37:46 +02:00
|
|
|
const char * const OPENED_BY_DEBUGGER = "OpenedByDebugger";
|
|
|
|
const char * const OPENED_WITH_DISASSEMBLY = "DisassemblerView";
|
2010-12-08 14:08:35 +01:00
|
|
|
const char * const OPENED_WITH_MEMORY = "MemoryView";
|
2010-10-25 13:37:46 +02:00
|
|
|
|
2010-11-12 20:18:29 +01:00
|
|
|
const char * const DEBUGMODE = "Debugger.DebugMode";
|
|
|
|
const char * const DEBUG = "Debugger.Debug";
|
|
|
|
const int P_ACTION_DEBUG = 90; //priority for the modemanager
|
|
|
|
#ifdef Q_OS_MAC
|
|
|
|
const char * const DEBUG_KEY = "Ctrl+Y";
|
|
|
|
#else
|
|
|
|
const char * const DEBUG_KEY = "F5";
|
|
|
|
#endif
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
} // namespace Constants
|
2009-09-25 08:35:31 +02:00
|
|
|
|
2010-02-15 16:02:41 +01:00
|
|
|
|
2009-09-28 13:03:06 +02:00
|
|
|
enum DebuggerState
|
2009-09-25 08:35:31 +02:00
|
|
|
{
|
|
|
|
DebuggerNotReady, // Debugger not started
|
|
|
|
|
2010-07-09 17:07:59 +02:00
|
|
|
EngineSetupRequested, // Engine starts
|
2010-07-09 08:48:33 +02:00
|
|
|
EngineSetupFailed,
|
|
|
|
EngineSetupOk,
|
2010-07-08 11:54:06 +02:00
|
|
|
|
2010-07-09 17:07:59 +02:00
|
|
|
InferiorSetupRequested,
|
2010-07-08 18:10:50 +02:00
|
|
|
InferiorSetupFailed,
|
2009-09-25 08:35:31 +02:00
|
|
|
|
2010-07-09 17:07:59 +02:00
|
|
|
EngineRunRequested,
|
|
|
|
EngineRunFailed,
|
|
|
|
InferiorUnrunnable, // Used in the core dump adapter
|
2009-09-25 08:35:31 +02:00
|
|
|
|
2010-07-09 17:07:59 +02:00
|
|
|
InferiorRunRequested, // Debuggee requested to run
|
|
|
|
InferiorRunOk, // Debuggee running
|
|
|
|
InferiorRunFailed, // Debuggee running
|
2009-09-25 08:35:31 +02:00
|
|
|
|
2010-07-09 17:07:59 +02:00
|
|
|
InferiorStopRequested, // Debuggee running, stop requested
|
|
|
|
InferiorStopOk, // Debuggee stopped
|
|
|
|
InferiorStopFailed, // Debuggee not stopped, will kill debugger
|
|
|
|
|
|
|
|
InferiorShutdownRequested,
|
|
|
|
InferiorShutdownOk,
|
2009-09-25 08:35:31 +02:00
|
|
|
InferiorShutdownFailed,
|
|
|
|
|
2010-07-09 17:07:59 +02:00
|
|
|
EngineShutdownRequested,
|
|
|
|
EngineShutdownOk,
|
|
|
|
EngineShutdownFailed,
|
|
|
|
|
|
|
|
DebuggerFinished
|
2009-09-25 08:35:31 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
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
|
2010-05-05 12:41:52 +02:00
|
|
|
AttachTcf, // Attach to a running Target Communication Framework agent
|
2009-09-25 08:35:31 +02:00
|
|
|
AttachCore, // Attach to a core file
|
2010-05-05 12:49:08 +02:00
|
|
|
AttachToRemote, // Start and attach to a remote process
|
2010-12-01 15:41:08 +01:00
|
|
|
StartRemoteGdb, // Start gdb itself remotely
|
|
|
|
StartRemoteEngine // Start ipc guest engine on other machine
|
2009-09-25 08:35:31 +02:00
|
|
|
};
|
|
|
|
|
2010-02-05 10:23:55 +01:00
|
|
|
enum DebuggerCapabilities
|
|
|
|
{
|
|
|
|
ReverseSteppingCapability = 0x1,
|
|
|
|
SnapshotCapability = 0x2,
|
|
|
|
AutoDerefPointersCapability = 0x4,
|
|
|
|
DisassemblerCapability = 0x80,
|
|
|
|
RegisterCapability = 0x10,
|
|
|
|
ShowMemoryCapability = 0x20,
|
|
|
|
JumpToLineCapability = 0x40,
|
|
|
|
ReloadModuleCapability = 0x80,
|
|
|
|
ReloadModuleSymbolsCapability = 0x100,
|
2010-02-11 17:29:10 +01:00
|
|
|
BreakOnThrowAndCatchCapability = 0x200,
|
2010-02-15 16:02:41 +01:00
|
|
|
ReturnFromFunctionCapability = 0x400,
|
2010-03-29 18:44:02 +02:00
|
|
|
CreateFullBacktraceCapability = 0x800,
|
2010-05-07 15:16:31 +02:00
|
|
|
AddWatcherCapability = 0x1000,
|
2010-11-26 09:58:34 +01:00
|
|
|
WatchpointCapability = 0x2000,
|
2010-12-16 12:05:48 +01:00
|
|
|
ShowModuleSymbolsCapability = 0x4000
|
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,
|
|
|
|
AppOutput,
|
|
|
|
AppError,
|
2010-06-16 11:08:54 +02:00
|
|
|
AppStuff,
|
2010-08-26 16:02:41 +02:00
|
|
|
StatusBar, // LogStatus and also put to the status bar
|
|
|
|
ScriptConsoleOutput
|
2010-07-09 17:07:59 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
enum ModelRoles
|
|
|
|
{
|
2010-06-16 11:08:54 +02:00
|
|
|
DisplaySourceRole = 32, // Qt::UserRole
|
2010-06-15 09:13:22 +02:00
|
|
|
|
2010-06-16 11:08:54 +02:00
|
|
|
EngineStateRole,
|
|
|
|
EngineCapabilitiesRole,
|
2010-06-15 09:13:22 +02:00
|
|
|
EngineActionsEnabledRole,
|
2010-07-13 17:16:31 +02:00
|
|
|
RequestActivationRole,
|
2010-11-04 09:54:23 +01:00
|
|
|
RequestContextMenuRole,
|
2010-06-15 09:13:22 +02:00
|
|
|
|
2010-06-16 11:08:54 +02:00
|
|
|
// Locals and Watchers
|
|
|
|
LocalsINameRole,
|
2010-09-22 17:30:22 +02:00
|
|
|
LocalsEditTypeRole, // A QVariant::type describing the item
|
|
|
|
LocalsIntegerBaseRole, // Number base 16, 10, 8, 2
|
2010-06-16 11:08:54 +02:00
|
|
|
LocalsExpressionRole,
|
|
|
|
LocalsExpandedRole, // The preferred expanded state to the view
|
|
|
|
LocalsTypeFormatListRole,
|
|
|
|
LocalsTypeFormatRole, // Used to communicate alternative formats to the view
|
|
|
|
LocalsIndividualFormatRole,
|
|
|
|
LocalsAddressRole, // Memory address of variable as quint64
|
|
|
|
LocalsRawValueRole, // Unformatted value as string
|
|
|
|
LocalsPointerValueRole, // Pointer value (address) as quint64
|
|
|
|
LocalsIsWatchpointAtAddressRole,
|
|
|
|
LocalsIsWatchpointAtPointerValueRole,
|
|
|
|
|
2010-06-15 12:15:25 +02:00
|
|
|
// Snapshots
|
2010-12-16 12:05:48 +01:00
|
|
|
SnapshotCapabilityRole
|
2010-06-16 11:08:54 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
enum DebuggerEngineType
|
|
|
|
{
|
|
|
|
NoEngineType = 0,
|
|
|
|
GdbEngineType = 0x01,
|
|
|
|
ScriptEngineType = 0x02,
|
|
|
|
CdbEngineType = 0x04,
|
|
|
|
PdbEngineType = 0x08,
|
|
|
|
TcfEngineType = 0x10,
|
|
|
|
QmlEngineType = 0x20,
|
2010-10-08 12:14:51 +02:00
|
|
|
QmlCppEngineType = 0x40,
|
2010-11-26 10:10:00 +01:00
|
|
|
LldbEngineType = 0x80,
|
2010-06-16 11:08:54 +02:00
|
|
|
AllEngineTypes = GdbEngineType
|
|
|
|
| ScriptEngineType
|
|
|
|
| CdbEngineType
|
|
|
|
| PdbEngineType
|
|
|
|
| TcfEngineType
|
|
|
|
| QmlEngineType
|
2010-08-18 13:54:12 +02:00
|
|
|
| QmlCppEngineType
|
2010-11-26 10:10:00 +01:00
|
|
|
| LldbEngineType
|
2010-08-18 13:54:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
enum DebuggerLanguage
|
|
|
|
{
|
2010-08-24 17:17:54 +02:00
|
|
|
AnyLanguage = 0x0,
|
|
|
|
CppLanguage = 0x1,
|
|
|
|
QmlLanguage = 0x2
|
2010-06-15 09:13:22 +02: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
|
|
|
|
|
|
|
|
#endif // DEBUGGERCONSTANTS_H
|
|
|
|
|