forked from qt-creator/qt-creator
Debugger: Separate internal constants.
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "breakhandler.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "breakpointmarker.h"
|
||||
|
||||
#include "debuggeractions.h"
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "breakwindow.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "breakhandler.h"
|
||||
#include "debuggerengine.h"
|
||||
#include "debuggeractions.h"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "cdboptionspage.h"
|
||||
#include "cdboptions.h"
|
||||
#include "debuggerconstants.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "cdbengine.h"
|
||||
|
||||
#include <utils/synchronousprocess.h>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "commonoptionspage.h"
|
||||
|
||||
#include "debuggeractions.h"
|
||||
#include "debuggerconstants.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "debuggercore.h"
|
||||
#include "debuggerstringutils.h"
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ HEADERS += breakhandler.h \
|
||||
debuggeractions.h \
|
||||
debuggercore.h \
|
||||
debuggerconstants.h \
|
||||
debuggerinternalconstants.h \
|
||||
debuggerdialogs.h \
|
||||
debuggerengine.h \
|
||||
debuggermainwindow.h \
|
||||
|
||||
@@ -33,16 +33,23 @@
|
||||
#ifndef DEBUGGERCONSTANTS_H
|
||||
#define DEBUGGERCONSTANTS_H
|
||||
|
||||
#include <QtCore/QtGlobal>
|
||||
#include <QtCore/QFlags>
|
||||
|
||||
namespace Debugger {
|
||||
namespace Constants {
|
||||
|
||||
// modes and their priorities
|
||||
// Debug mode
|
||||
const char * const MODE_DEBUG = "Debugger.Mode.Debug";
|
||||
const int P_MODE_DEBUG = 85;
|
||||
|
||||
// common actions
|
||||
// Contexts
|
||||
const char * const C_DEBUGMODE = "Debugger.DebugMode";
|
||||
const char * const C_CPPDEBUGGER = "Gdb Debugger";
|
||||
const char * const C_QMLDEBUGGER = "Qml/JavaScript Debugger";
|
||||
|
||||
// Project Explorer run mode (RUN/DEBUG)
|
||||
const char * const DEBUGMODE = "Debugger.DebugMode";
|
||||
|
||||
// Common actions (accessed by QML inspector)
|
||||
const char * const INTERRUPT = "Debugger.Interrupt";
|
||||
const char * const CONTINUE = "Debugger.Continue";
|
||||
const char * const STOP = "Debugger.Stop";
|
||||
@@ -53,20 +60,7 @@ const char * const NEXT = "Debugger.NextLine";
|
||||
const char * const REVERSE = "Debugger.ReverseDirection";
|
||||
const char * const OPERATE_BY_INSTRUCTION = "Debugger.OperateByInstruction";
|
||||
|
||||
const char * const C_DEBUGMODE = "Debugger.DebugMode";
|
||||
const char * const C_CPPDEBUGGER = "Gdb Debugger";
|
||||
const char * const C_QMLDEBUGGER = "Qml/JavaScript Debugger";
|
||||
|
||||
const char * const DEBUGGER_COMMON_SETTINGS_ID = "A.Common";
|
||||
const char * const DEBUGGER_COMMON_SETTINGS_NAME =
|
||||
QT_TRANSLATE_NOOP("Debugger", "General");
|
||||
const char * const DEBUGGER_SETTINGS_CATEGORY = "O.Debugger";
|
||||
const char * const DEBUGGER_SETTINGS_TR_CATEGORY =
|
||||
QT_TRANSLATE_NOOP("Debugger", "Debugger");
|
||||
const char * const DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON =
|
||||
":/core/images/category_debug.png";
|
||||
|
||||
// dock widget names
|
||||
// DebuggerMainWindow dock widget names
|
||||
const char * const DOCKWIDGET_BREAK = "Debugger.Docks.Break";
|
||||
const char * const DOCKWIDGET_MODULES = "Debugger.Docks.Modules";
|
||||
const char * const DOCKWIDGET_REGISTER = "Debugger.Docks.Register";
|
||||
@@ -81,26 +75,8 @@ const char * const DOCKWIDGET_QML_INSPECTOR = "Debugger.Docks.QmlInspector";
|
||||
const char * const DOCKWIDGET_QML_SCRIPTCONSOLE = "Debugger.Docks.ScriptConsole";
|
||||
const char * const DOCKWIDGET_DEFAULT_AREA = "Debugger.Docks.DefaultArea";
|
||||
|
||||
namespace Internal {
|
||||
enum { debug = 0 };
|
||||
} // namespace Internal
|
||||
|
||||
const char * const OPENED_BY_DEBUGGER = "OpenedByDebugger";
|
||||
const char * const OPENED_WITH_DISASSEMBLY = "DisassemblerView";
|
||||
const char * const OPENED_WITH_MEMORY = "MemoryView";
|
||||
|
||||
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
|
||||
|
||||
} // namespace Constants
|
||||
|
||||
|
||||
enum DebuggerState
|
||||
{
|
||||
DebuggerNotReady, // Debugger not started
|
||||
@@ -194,40 +170,6 @@ enum LogChannel
|
||||
ScriptConsoleOutput
|
||||
};
|
||||
|
||||
enum ModelRoles
|
||||
{
|
||||
DisplaySourceRole = 32, // Qt::UserRole
|
||||
|
||||
EngineStateRole,
|
||||
EngineCapabilitiesRole,
|
||||
EngineActionsEnabledRole,
|
||||
RequestActivationRole,
|
||||
RequestContextMenuRole,
|
||||
|
||||
// Locals and Watchers
|
||||
LocalsINameRole,
|
||||
LocalsEditTypeRole, // A QVariant::type describing the item
|
||||
LocalsIntegerBaseRole, // Number base 16, 10, 8, 2
|
||||
LocalsExpressionRole,
|
||||
LocalsRawExpressionRole,
|
||||
LocalsExpandedRole, // The preferred expanded state to the view
|
||||
LocalsRawTypeRole, // Raw type name
|
||||
LocalsTypeRole, // Display type name
|
||||
LocalsTypeFormatListRole,
|
||||
LocalsTypeFormatRole, // Used to communicate alternative formats to the view
|
||||
LocalsIndividualFormatRole,
|
||||
LocalsAddressRole, // Memory address of variable as quint64
|
||||
LocalsReferencingAddressRole, // Address referencing for 'Automatically dereferenced pointer'
|
||||
LocalsSizeRole, // Size of variable as quint
|
||||
LocalsRawValueRole, // Unformatted value as string
|
||||
LocalsPointerValueRole, // Pointer value (address) as quint64
|
||||
LocalsIsWatchpointAtAddressRole,
|
||||
LocalsIsWatchpointAtPointerValueRole,
|
||||
|
||||
// Snapshots
|
||||
SnapshotCapabilityRole
|
||||
};
|
||||
|
||||
enum DebuggerEngineType
|
||||
{
|
||||
NoEngineType = 0,
|
||||
@@ -258,4 +200,3 @@ Q_DECLARE_FLAGS(DebuggerLanguages, DebuggerLanguage)
|
||||
} // namespace Debugger
|
||||
|
||||
#endif // DEBUGGERCONSTANTS_H
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
#include "debuggerengine.h"
|
||||
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "debuggeractions.h"
|
||||
#include "debuggercore.h"
|
||||
#include "debuggerplugin.h"
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** This file is part of Qt Creator
|
||||
**
|
||||
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
||||
**
|
||||
** Contact: Nokia Corporation (info@qt.nokia.com)
|
||||
**
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** 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.
|
||||
**
|
||||
** If you have questions regarding the use of this file, please contact
|
||||
** Nokia at qt-info@nokia.com.
|
||||
**
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef DEBUGGERINTERNALCONSTANTS_H
|
||||
#define DEBUGGERINTERNALCONSTANTS_H
|
||||
|
||||
#include <QtCore/QtGlobal>
|
||||
|
||||
namespace Debugger {
|
||||
namespace Constants {
|
||||
|
||||
// modes and their priorities
|
||||
const int P_MODE_DEBUG = 85;
|
||||
|
||||
const char * const DEBUGGER_COMMON_SETTINGS_ID = "A.Common";
|
||||
const char * const DEBUGGER_COMMON_SETTINGS_NAME =
|
||||
QT_TRANSLATE_NOOP("Debugger", "General");
|
||||
const char * const DEBUGGER_SETTINGS_CATEGORY = "O.Debugger";
|
||||
const char * const DEBUGGER_SETTINGS_TR_CATEGORY =
|
||||
QT_TRANSLATE_NOOP("Debugger", "Debugger");
|
||||
const char * const DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON =
|
||||
":/core/images/category_debug.png";
|
||||
|
||||
namespace Internal {
|
||||
enum { debug = 0 };
|
||||
} // namespace Internal
|
||||
|
||||
const char * const OPENED_BY_DEBUGGER = "OpenedByDebugger";
|
||||
const char * const OPENED_WITH_DISASSEMBLY = "DisassemblerView";
|
||||
const char * const OPENED_WITH_MEMORY = "MemoryView";
|
||||
|
||||
// Debug action
|
||||
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
|
||||
|
||||
} // namespace Constants
|
||||
|
||||
enum ModelRoles
|
||||
{
|
||||
DisplaySourceRole = 32, // Qt::UserRole
|
||||
|
||||
EngineStateRole,
|
||||
EngineCapabilitiesRole,
|
||||
EngineActionsEnabledRole,
|
||||
RequestActivationRole,
|
||||
RequestContextMenuRole,
|
||||
|
||||
// Locals and Watchers
|
||||
LocalsINameRole,
|
||||
LocalsEditTypeRole, // A QVariant::type describing the item
|
||||
LocalsIntegerBaseRole, // Number base 16, 10, 8, 2
|
||||
LocalsExpressionRole,
|
||||
LocalsRawExpressionRole,
|
||||
LocalsExpandedRole, // The preferred expanded state to the view
|
||||
LocalsRawTypeRole, // Raw type name
|
||||
LocalsTypeRole, // Display type name
|
||||
LocalsTypeFormatListRole,
|
||||
LocalsTypeFormatRole, // Used to communicate alternative formats to the view
|
||||
LocalsIndividualFormatRole,
|
||||
LocalsAddressRole, // Memory address of variable as quint64
|
||||
LocalsReferencingAddressRole, // Address referencing for 'Automatically dereferenced pointer'
|
||||
LocalsSizeRole, // Size of variable as quint
|
||||
LocalsRawValueRole, // Unformatted value as string
|
||||
LocalsPointerValueRole, // Pointer value (address) as quint64
|
||||
LocalsIsWatchpointAtAddressRole,
|
||||
LocalsIsWatchpointAtPointerValueRole,
|
||||
|
||||
// Snapshots
|
||||
SnapshotCapabilityRole
|
||||
};
|
||||
|
||||
} // namespace Debugger
|
||||
|
||||
#endif // DEBUGGERINTERNALCONSTANTS_H
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "debuggerstartparameters.h"
|
||||
#include "debuggeractions.h"
|
||||
#include "debuggerconstants.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "debuggercore.h"
|
||||
#include "debuggerdialogs.h"
|
||||
#include "debuggerengine.h"
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "debuggerruncontrolfactory.h"
|
||||
|
||||
#include "debuggeractions.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "debuggercore.h"
|
||||
#include "debuggerengine.h"
|
||||
#include "debuggermainwindow.h"
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "disassemblerlines.h"
|
||||
#include "breakhandler.h"
|
||||
#include "debuggerengine.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "debuggercore.h"
|
||||
#include "debuggerstringutils.h"
|
||||
#include "stackframe.h"
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include "gdbengine.h"
|
||||
|
||||
#include "debuggerstartparameters.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "disassemblerlines.h"
|
||||
#include "attachgdbadapter.h"
|
||||
#include "coregdbadapter.h"
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "gdboptionspage.h"
|
||||
#include "debuggeractions.h"
|
||||
#include "debuggercore.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
#include <projectexplorer/projectexplorer.h>
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "debuggerengine.h"
|
||||
#include "debuggerstartparameters.h"
|
||||
#include "debuggercore.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
|
||||
#include <coreplugin/coreconstants.h>
|
||||
#include <coreplugin/editormanager/editormanager.h>
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "snapshothandler.h"
|
||||
|
||||
#include "debuggerconstants.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "debuggercore.h"
|
||||
#include "debuggerengine.h"
|
||||
#include "debuggerrunner.h"
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "snapshothandler.h"
|
||||
|
||||
#include "debuggeractions.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "debuggercore.h"
|
||||
#include "debuggerengine.h"
|
||||
|
||||
@@ -46,7 +47,6 @@
|
||||
#include <QtGui/QMenu>
|
||||
#include <QtGui/QKeyEvent>
|
||||
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include "breakhandler.h"
|
||||
#include "debuggerengine.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "debuggercore.h"
|
||||
#include "debuggerstringutils.h"
|
||||
#include "stackframe.h"
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include "stackhandler.h"
|
||||
|
||||
#include "debuggeractions.h"
|
||||
#include "debuggerconstants.h"
|
||||
#include "debuggercore.h"
|
||||
#include "debuggerengine.h"
|
||||
#include "memoryagent.h"
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "watchhandler.h"
|
||||
|
||||
#include "breakhandler.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "debuggeractions.h"
|
||||
#include "debuggercore.h"
|
||||
#include "debuggerengine.h"
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "registerhandler.h"
|
||||
#include "debuggeractions.h"
|
||||
#include "debuggerconstants.h"
|
||||
#include "debuggerinternalconstants.h"
|
||||
#include "debuggercore.h"
|
||||
#include "debuggerdialogs.h"
|
||||
#include "debuggerengine.h"
|
||||
|
||||
Reference in New Issue
Block a user