2009-02-25 09:15:00 +01:00
|
|
|
/**************************************************************************
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
**
|
2010-03-05 11:25:49 +01:00
|
|
|
** Copyright (c) 2010 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
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** Commercial Usage
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** Licensees holding valid Qt Commercial licenses may use this file in
|
|
|
|
** accordance with the Qt Commercial License Agreement provided with the
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
** a written agreement between you and Nokia.
|
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
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** If you are unsure which license is appropriate for your use, please
|
2009-08-14 09:30:56 +02:00
|
|
|
** contact the sales department at http://qt.nokia.com/contact.
|
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-02-09 20:44:40 +01:00
|
|
|
const char * const LANG_CPP = "C++";
|
2008-12-02 12:01:29 +01:00
|
|
|
// common actions
|
|
|
|
const char * const INTERRUPT = "Debugger.Interrupt";
|
|
|
|
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-03-19 13:58:26 +01:00
|
|
|
const char * const M_DEBUG_LANGUAGES = "Debugger.Menu.View.Languages";
|
2009-01-13 17:41:23 +01:00
|
|
|
const char * const M_DEBUG_VIEWS = "Debugger.Menu.View.Debug";
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-03-23 18:12:03 +01:00
|
|
|
const char * const C_DEBUGMODE = "Debugger.DebugMode";
|
|
|
|
const char * const C_CPPDEBUGGER = "Gdb Debugger";
|
2008-12-02 12:01:29 +01:00
|
|
|
const char * const GDBRUNNING = "Gdb.Running";
|
|
|
|
|
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
|
|
|
|
2009-03-03 14:01:58 +01:00
|
|
|
namespace Internal {
|
|
|
|
enum { debug = 0 };
|
2009-11-03 16:02:16 +01:00
|
|
|
#ifdef Q_OS_MAC
|
|
|
|
const char * const LD_PRELOAD_ENV_VAR = "DYLD_INSERT_LIBRARIES";
|
|
|
|
#else
|
|
|
|
const char * const LD_PRELOAD_ENV_VAR = "LD_PRELOAD";
|
|
|
|
#endif
|
|
|
|
|
2010-02-15 16:02:41 +01:00
|
|
|
} // namespace Internal
|
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
|
|
|
|
|
|
|
|
EngineStarting, // Engine starts
|
|
|
|
|
|
|
|
AdapterStarting,
|
2010-07-08 11:44:00 +02:00
|
|
|
EngineStarted,
|
|
|
|
EngineStartFailed,
|
2009-09-29 11:40:40 +02:00
|
|
|
InferiorUnrunnable, // Used in the core dump adapter
|
2009-09-25 08:35:31 +02:00
|
|
|
InferiorStarting,
|
2009-09-29 10:15:52 +02:00
|
|
|
// InferiorStarted, // Use InferiorRunningRequested or InferiorStopped
|
2009-09-25 08:35:31 +02:00
|
|
|
InferiorStartFailed,
|
|
|
|
|
|
|
|
InferiorRunningRequested, // Debuggee requested to run
|
2009-11-02 16:59:57 +01:00
|
|
|
InferiorRunningRequested_Kill, // Debuggee requested to run, but want to kill it
|
2009-09-25 08:35:31 +02:00
|
|
|
InferiorRunning, // Debuggee running
|
|
|
|
|
2009-09-29 10:15:52 +02:00
|
|
|
InferiorStopping, // Debuggee running, stop requested
|
2009-11-02 16:59:57 +01:00
|
|
|
InferiorStopping_Kill, // Debuggee running, stop requested, want to kill it
|
2009-09-25 08:35:31 +02:00
|
|
|
InferiorStopped, // Debuggee stopped
|
2009-10-20 11:02:16 +02:00
|
|
|
InferiorStopFailed, // Debuggee not stopped, will kill debugger
|
2009-09-25 08:35:31 +02:00
|
|
|
|
|
|
|
InferiorShuttingDown,
|
|
|
|
InferiorShutDown,
|
|
|
|
InferiorShutdownFailed,
|
|
|
|
|
2009-10-20 11:02:16 +02:00
|
|
|
EngineShuttingDown
|
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
|
|
|
|
StartRemoteGdb // Start gdb itself remotely
|
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,
|
|
|
|
WatchpointCapability = 0x2000
|
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
|
|
|
|
LogOutput,
|
|
|
|
LogWarning,
|
|
|
|
LogError,
|
|
|
|
LogStatus, // Used for status changed messages
|
|
|
|
LogTime, // Used for time stamp messages
|
|
|
|
LogDebug,
|
|
|
|
LogMisc,
|
|
|
|
AppOutput,
|
|
|
|
AppError,
|
|
|
|
AppStuff,
|
|
|
|
StatusBar // LogStatus and also put to the status bar
|
|
|
|
};
|
|
|
|
|
|
|
|
enum ModelRoles
|
|
|
|
{
|
|
|
|
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-06-16 11:08:54 +02:00
|
|
|
// Running
|
|
|
|
RequestExecContinueRole,
|
|
|
|
RequestExecInterruptRole,
|
|
|
|
RequestExecResetRole,
|
|
|
|
RequestExecStepRole,
|
|
|
|
RequestExecStepOutRole,
|
|
|
|
RequestExecNextRole,
|
|
|
|
RequestExecRunToLineRole,
|
|
|
|
RequestExecRunToFunctionRole,
|
|
|
|
RequestExecReturnFromFunctionRole,
|
|
|
|
RequestExecJumpToLineRole,
|
|
|
|
RequestExecWatchRole,
|
|
|
|
RequestExecSnapshotRole,
|
|
|
|
RequestExecFrameDownRole,
|
|
|
|
RequestExecFrameUpRole,
|
|
|
|
RequestExecDetachRole,
|
|
|
|
RequestExecExitRole,
|
2010-06-22 12:02:24 +02:00
|
|
|
RequestOperatedByInstructionTriggeredRole,
|
2010-06-22 12:41:02 +02:00
|
|
|
RequestExecuteCommandRole,
|
2010-06-16 11:08:54 +02:00
|
|
|
|
|
|
|
// Breakpoints
|
|
|
|
BreakpointEnabledRole,
|
|
|
|
BreakpointUseFullPathRole,
|
|
|
|
BreakpointFunctionNameRole,
|
|
|
|
BreakpointFileNameRole,
|
|
|
|
BreakpointConditionRole,
|
|
|
|
BreakpointIgnoreCountRole,
|
|
|
|
BreakpointThreadSpecRole,
|
|
|
|
RequestActivateBreakpointRole,
|
|
|
|
RequestRemoveBreakpointByIndexRole,
|
|
|
|
RequestSynchronizeBreakpointsRole,
|
|
|
|
RequestBreakByFunctionRole,
|
|
|
|
RequestBreakByFunctionMainRole,
|
2010-06-25 15:02:53 +02:00
|
|
|
RequestToggleBreakpointRole,
|
2010-06-25 16:06:48 +02:00
|
|
|
RequestToggleBreakpointEnabledRole,
|
|
|
|
RequestContextMenuRole,
|
2010-06-16 11:08:54 +02:00
|
|
|
|
|
|
|
// Locals and Watchers
|
|
|
|
LocalsINameRole,
|
|
|
|
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-22 17:18:29 +02:00
|
|
|
RequestWatchPointRole,
|
2010-06-16 11:08:54 +02:00
|
|
|
RequestToggleWatchRole,
|
2010-06-22 18:18:13 +02:00
|
|
|
RequestToolTipByExpressionRole,
|
2010-06-16 11:08:54 +02:00
|
|
|
RequestClearCppCodeModelSnapshotRole,
|
|
|
|
RequestAssignValueRole,
|
|
|
|
RequestAssignTypeRole,
|
2010-06-23 15:13:51 +02:00
|
|
|
RequestWatchExpressionRole,
|
|
|
|
RequestRemoveWatchExpressionRole,
|
2010-06-16 11:08:54 +02:00
|
|
|
|
|
|
|
// Stack
|
|
|
|
StackFrameAddressRole,
|
|
|
|
RequestActivateFrameRole,
|
|
|
|
RequestReloadFullStackRole,
|
|
|
|
RequestShowMemoryRole,
|
|
|
|
RequestShowDisassemblerRole,
|
|
|
|
|
|
|
|
// Threads
|
|
|
|
CurrentThreadIdRole,
|
|
|
|
RequestSelectThreadRole,
|
|
|
|
|
2010-06-15 09:13:22 +02:00
|
|
|
// Modules
|
|
|
|
RequestReloadModulesRole,
|
|
|
|
RequestModuleSymbolsRole,
|
2010-06-15 12:15:25 +02:00
|
|
|
RequestAllSymbolsRole,
|
2010-06-16 11:08:54 +02:00
|
|
|
RequestOpenFileRole,
|
|
|
|
|
|
|
|
// Registers
|
|
|
|
RegisterNumberBaseRole, // Currently used number base
|
|
|
|
RegisterAddressRole, // Start value for opening memory view
|
|
|
|
RegisterChangedRole, // Used for painting changed values
|
|
|
|
RequestSetRegisterRole,
|
|
|
|
RequestReloadRegistersRole,
|
2010-06-15 12:15:25 +02:00
|
|
|
|
|
|
|
// Snapshots
|
|
|
|
RequestMakeSnapshotRole,
|
|
|
|
RequestActivateSnapshotRole,
|
|
|
|
RequestRemoveSnapshotRole,
|
2010-06-16 11:08:54 +02:00
|
|
|
|
|
|
|
// Sources
|
|
|
|
RequestReloadSourceFilesRole,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum DebuggerEngineType
|
|
|
|
{
|
|
|
|
NoEngineType = 0,
|
|
|
|
GdbEngineType = 0x01,
|
|
|
|
ScriptEngineType = 0x02,
|
|
|
|
CdbEngineType = 0x04,
|
|
|
|
PdbEngineType = 0x08,
|
|
|
|
TcfEngineType = 0x10,
|
|
|
|
QmlEngineType = 0x20,
|
|
|
|
AllEngineTypes = GdbEngineType
|
|
|
|
| ScriptEngineType
|
|
|
|
| CdbEngineType
|
|
|
|
| PdbEngineType
|
|
|
|
| TcfEngineType
|
|
|
|
| QmlEngineType
|
2010-06-15 09:13:22 +02:00
|
|
|
};
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
} // namespace Debugger
|
|
|
|
|
|
|
|
#endif // DEBUGGERCONSTANTS_H
|
|
|
|
|