forked from qt-creator/qt-creator
Debugger: Work towards exporting DebuggerManager: Introduce d.
Clean out header.
This commit is contained in:
@@ -27,6 +27,7 @@ HEADERS += breakhandler.h \
|
|||||||
debuggerplugin.h \
|
debuggerplugin.h \
|
||||||
debuggerrunner.h \
|
debuggerrunner.h \
|
||||||
debuggertooltip.h \
|
debuggertooltip.h \
|
||||||
|
debuggerstringutils.h \
|
||||||
watchutils.h \
|
watchutils.h \
|
||||||
idebuggerengine.h \
|
idebuggerengine.h \
|
||||||
imports.h \
|
imports.h \
|
||||||
|
|||||||
@@ -127,6 +127,22 @@ Core::Utils::SavedAction *theDebuggerAction(int code);
|
|||||||
bool theDebuggerBoolSetting(int code);
|
bool theDebuggerBoolSetting(int code);
|
||||||
QString theDebuggerStringSetting(int code);
|
QString theDebuggerStringSetting(int code);
|
||||||
|
|
||||||
|
struct DebuggerManagerActions {
|
||||||
|
QAction *continueAction;
|
||||||
|
QAction *stopAction;
|
||||||
|
QAction *resetAction; // FIXME: Should not be needed in a stable release
|
||||||
|
QAction *stepAction;
|
||||||
|
QAction *stepOutAction;
|
||||||
|
QAction *runToLineAction;
|
||||||
|
QAction *runToFunctionAction;
|
||||||
|
QAction *jumpToLineAction;
|
||||||
|
QAction *nextAction;
|
||||||
|
QAction *watchAction;
|
||||||
|
QAction *breakAction;
|
||||||
|
QAction *sepAction;
|
||||||
|
QAction *reverseDirectionAction;
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Debugger
|
} // namespace Debugger
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "debuggeragents.h"
|
#include "debuggeragents.h"
|
||||||
|
#include "debuggerstringutils.h"
|
||||||
#include "idebuggerengine.h"
|
#include "idebuggerengine.h"
|
||||||
|
|
||||||
#include <coreplugin/coreconstants.h>
|
#include <coreplugin/coreconstants.h>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -32,29 +32,26 @@
|
|||||||
|
|
||||||
#include "debuggerconstants.h"
|
#include "debuggerconstants.h"
|
||||||
|
|
||||||
#include <utils/fancymainwindow.h>
|
|
||||||
|
|
||||||
#include <QtCore/QByteArray>
|
|
||||||
#include <QtCore/QObject>
|
#include <QtCore/QObject>
|
||||||
|
#include <QtCore/QSharedPointer>
|
||||||
#include <QtCore/QStringList>
|
#include <QtCore/QStringList>
|
||||||
#include <QtCore/QVariant>
|
#include <QtCore/QVariant>
|
||||||
#include <QtCore/QSharedPointer>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QAction;
|
class QAction;
|
||||||
class QAbstractItemModel;
|
|
||||||
class QDockWidget;
|
class QDockWidget;
|
||||||
class QLabel;
|
class QLabel;
|
||||||
class QMessageBox;
|
|
||||||
class QModelIndex;
|
|
||||||
class QPoint;
|
|
||||||
class QTimer;
|
|
||||||
class QWidget;
|
|
||||||
class QDebug;
|
class QDebug;
|
||||||
|
class QAbstractItemModel;
|
||||||
|
class QPoint;
|
||||||
|
class QVariant;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
class IOptionsPage;
|
class IOptionsPage;
|
||||||
|
namespace Utils {
|
||||||
|
class FancyMainWindow;
|
||||||
|
}
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
|
||||||
namespace TextEditor {
|
namespace TextEditor {
|
||||||
@@ -64,15 +61,8 @@ class ITextEditor;
|
|||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
typedef QLatin1Char _c;
|
|
||||||
typedef QLatin1String __;
|
|
||||||
inline QString _(const char *s) { return QString::fromLatin1(s); }
|
|
||||||
inline QString _(const QByteArray &ba) { return QString::fromLatin1(ba, ba.size()); }
|
|
||||||
|
|
||||||
class DebuggerOutputWindow;
|
class DebuggerOutputWindow;
|
||||||
class DebuggerRunControl;
|
|
||||||
class DebuggerPlugin;
|
class DebuggerPlugin;
|
||||||
class DebugMode;
|
|
||||||
|
|
||||||
class BreakHandler;
|
class BreakHandler;
|
||||||
class BreakpointData;
|
class BreakpointData;
|
||||||
@@ -85,6 +75,12 @@ class Symbol;
|
|||||||
class ThreadsHandler;
|
class ThreadsHandler;
|
||||||
class WatchData;
|
class WatchData;
|
||||||
class WatchHandler;
|
class WatchHandler;
|
||||||
|
class IDebuggerEngine;
|
||||||
|
class GdbEngine;
|
||||||
|
class ScriptEngine;
|
||||||
|
class CdbDebugEngine;
|
||||||
|
struct CdbDebugEnginePrivate;
|
||||||
|
struct DebuggerManagerActions;
|
||||||
|
|
||||||
class DebuggerStartParameters
|
class DebuggerStartParameters
|
||||||
{
|
{
|
||||||
@@ -115,12 +111,6 @@ public:
|
|||||||
typedef QSharedPointer<DebuggerStartParameters> DebuggerStartParametersPtr;
|
typedef QSharedPointer<DebuggerStartParameters> DebuggerStartParametersPtr;
|
||||||
QDebug operator<<(QDebug str, const DebuggerStartParameters &);
|
QDebug operator<<(QDebug str, const DebuggerStartParameters &);
|
||||||
|
|
||||||
class IDebuggerEngine;
|
|
||||||
class GdbEngine;
|
|
||||||
class ScriptEngine;
|
|
||||||
class CdbDebugEngine;
|
|
||||||
struct CdbDebugEnginePrivate;
|
|
||||||
|
|
||||||
// Flags for initialization
|
// Flags for initialization
|
||||||
enum DebuggerEngineTypeFlags
|
enum DebuggerEngineTypeFlags
|
||||||
{
|
{
|
||||||
@@ -140,6 +130,8 @@ QDebug operator<<(QDebug d, DebuggerState state);
|
|||||||
// DebuggerManager
|
// DebuggerManager
|
||||||
//
|
//
|
||||||
|
|
||||||
|
struct DebuggerManagerPrivate;
|
||||||
|
|
||||||
class DebuggerManager : public QObject
|
class DebuggerManager : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -148,7 +140,8 @@ public:
|
|||||||
DebuggerManager();
|
DebuggerManager();
|
||||||
~DebuggerManager();
|
~DebuggerManager();
|
||||||
|
|
||||||
friend class CdbDebugEngine;
|
friend class IDebuggerEngine;
|
||||||
|
friend class DebuggerPlugin;
|
||||||
friend class CdbDebugEventCallback;
|
friend class CdbDebugEventCallback;
|
||||||
friend class CdbDumperHelper;
|
friend class CdbDumperHelper;
|
||||||
friend class CdbExceptionLoggerEventCallback;
|
friend class CdbExceptionLoggerEventCallback;
|
||||||
@@ -159,12 +152,12 @@ public:
|
|||||||
|
|
||||||
QList<Core::IOptionsPage*> initializeEngines(unsigned enabledTypeFlags);
|
QList<Core::IOptionsPage*> initializeEngines(unsigned enabledTypeFlags);
|
||||||
|
|
||||||
Core::Utils::FancyMainWindow *mainWindow() const { return m_mainWindow; }
|
Core::Utils::FancyMainWindow *mainWindow() const;
|
||||||
QLabel *statusLabel() const { return m_statusLabel; }
|
QLabel *statusLabel() const;
|
||||||
IDebuggerEngine *currentEngine() const { return m_engine; }
|
IDebuggerEngine *currentEngine() const;
|
||||||
|
|
||||||
virtual DebuggerStartParametersPtr startParameters() const;
|
DebuggerStartParametersPtr startParameters() const;
|
||||||
virtual qint64 inferiorPid() const;
|
qint64 inferiorPid() const;
|
||||||
|
|
||||||
void showMessageBox(int icon, const QString &title, const QString &text);
|
void showMessageBox(int icon, const QString &title, const QString &text);
|
||||||
|
|
||||||
@@ -243,14 +236,15 @@ private slots:
|
|||||||
void startFailed();
|
void startFailed();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ModulesHandler *modulesHandler() { return m_modulesHandler; }
|
ModulesHandler *modulesHandler() const;
|
||||||
BreakHandler *breakHandler() { return m_breakHandler; }
|
BreakHandler *breakHandler() const;
|
||||||
RegisterHandler *registerHandler() { return m_registerHandler; }
|
RegisterHandler *registerHandler() const;
|
||||||
StackHandler *stackHandler() { return m_stackHandler; }
|
StackHandler *stackHandler() const;
|
||||||
ThreadsHandler *threadsHandler() { return m_threadsHandler; }
|
ThreadsHandler *threadsHandler() const;
|
||||||
WatchHandler *watchHandler() { return m_watchHandler; }
|
WatchHandler *watchHandler() const;
|
||||||
SourceFilesWindow *sourceFileWindow() { return m_sourceFilesWindow; }
|
SourceFilesWindow *sourceFileWindow() const;
|
||||||
QWidget *threadsWindow() const { return m_threadsWindow; }
|
QWidget *threadsWindow() const;
|
||||||
|
DebuggerManagerActions debuggerManagerActions() const;
|
||||||
|
|
||||||
void notifyInferiorStopped();
|
void notifyInferiorStopped();
|
||||||
void notifyInferiorRunning();
|
void notifyInferiorRunning();
|
||||||
@@ -261,7 +255,6 @@ private:
|
|||||||
|
|
||||||
DebuggerState state() const;
|
DebuggerState state() const;
|
||||||
void setState(DebuggerState state);
|
void setState(DebuggerState state);
|
||||||
DebuggerState m_state;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// internal implementation
|
// internal implementation
|
||||||
@@ -280,7 +273,6 @@ private:
|
|||||||
public:
|
public:
|
||||||
// stuff in this block should be made private by moving it to
|
// stuff in this block should be made private by moving it to
|
||||||
// one of the interfaces
|
// one of the interfaces
|
||||||
int status() const { return m_status; }
|
|
||||||
QList<Symbol> moduleSymbols(const QString &moduleName);
|
QList<Symbol> moduleSymbols(const QString &moduleName);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
@@ -312,64 +304,7 @@ private:
|
|||||||
void setToolTipExpression(const QPoint &mousePos,
|
void setToolTipExpression(const QPoint &mousePos,
|
||||||
TextEditor::ITextEditor *editor, int cursorPos);
|
TextEditor::ITextEditor *editor, int cursorPos);
|
||||||
|
|
||||||
// FIXME: Remove engine-specific state
|
DebuggerManagerPrivate *d;
|
||||||
DebuggerStartParametersPtr m_startParameters;
|
|
||||||
qint64 m_inferiorPid;
|
|
||||||
|
|
||||||
|
|
||||||
/// Views
|
|
||||||
Core::Utils::FancyMainWindow *m_mainWindow;
|
|
||||||
QLabel *m_statusLabel;
|
|
||||||
QDockWidget *m_breakDock;
|
|
||||||
QDockWidget *m_modulesDock;
|
|
||||||
QDockWidget *m_outputDock;
|
|
||||||
QDockWidget *m_registerDock;
|
|
||||||
QDockWidget *m_stackDock;
|
|
||||||
QDockWidget *m_sourceFilesDock;
|
|
||||||
QDockWidget *m_threadsDock;
|
|
||||||
QDockWidget *m_watchDock;
|
|
||||||
|
|
||||||
BreakHandler *m_breakHandler;
|
|
||||||
ModulesHandler *m_modulesHandler;
|
|
||||||
RegisterHandler *m_registerHandler;
|
|
||||||
StackHandler *m_stackHandler;
|
|
||||||
ThreadsHandler *m_threadsHandler;
|
|
||||||
WatchHandler *m_watchHandler;
|
|
||||||
SourceFilesWindow *m_sourceFilesWindow;
|
|
||||||
|
|
||||||
/// Actions
|
|
||||||
friend class DebuggerPlugin;
|
|
||||||
friend class IDebuggerEngine;
|
|
||||||
QAction *m_continueAction;
|
|
||||||
QAction *m_stopAction;
|
|
||||||
QAction *m_resetAction; // FIXME: Should not be needed in a stable release
|
|
||||||
QAction *m_stepAction;
|
|
||||||
QAction *m_stepOutAction;
|
|
||||||
QAction *m_runToLineAction;
|
|
||||||
QAction *m_runToFunctionAction;
|
|
||||||
QAction *m_jumpToLineAction;
|
|
||||||
QAction *m_nextAction;
|
|
||||||
QAction *m_watchAction;
|
|
||||||
QAction *m_breakAction;
|
|
||||||
QAction *m_sepAction;
|
|
||||||
QAction *m_reverseDirectionAction;
|
|
||||||
|
|
||||||
QWidget *m_breakWindow;
|
|
||||||
QWidget *m_localsWindow;
|
|
||||||
QWidget *m_registerWindow;
|
|
||||||
QWidget *m_modulesWindow;
|
|
||||||
QWidget *m_stackWindow;
|
|
||||||
QWidget *m_threadsWindow;
|
|
||||||
QWidget *m_watchersWindow;
|
|
||||||
DebuggerOutputWindow *m_outputWindow;
|
|
||||||
|
|
||||||
int m_status;
|
|
||||||
bool m_busy;
|
|
||||||
QTimer *m_statusTimer;
|
|
||||||
QString m_lastPermanentStatusMessage;
|
|
||||||
|
|
||||||
IDebuggerEngine *engine();
|
|
||||||
IDebuggerEngine *m_engine;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#include "debuggermanager.h"
|
#include "debuggermanager.h"
|
||||||
#include "debuggerrunner.h"
|
#include "debuggerrunner.h"
|
||||||
#include "stackframe.h"
|
#include "stackframe.h"
|
||||||
|
#include "debuggerstringutils.h"
|
||||||
|
|
||||||
#include "ui_commonoptionspage.h"
|
#include "ui_commonoptionspage.h"
|
||||||
#include "ui_dumperoptionpage.h"
|
#include "ui_dumperoptionpage.h"
|
||||||
@@ -619,7 +620,8 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
|
|||||||
am->actionContainer(ProjectExplorer::Constants::M_DEBUG_STARTDEBUGGING);
|
am->actionContainer(ProjectExplorer::Constants::M_DEBUG_STARTDEBUGGING);
|
||||||
|
|
||||||
Core::Command *cmd = 0;
|
Core::Command *cmd = 0;
|
||||||
cmd = am->registerAction(m_manager->m_continueAction,
|
const DebuggerManagerActions actions = m_manager->debuggerManagerActions();
|
||||||
|
cmd = am->registerAction(actions.continueAction,
|
||||||
ProjectExplorer::Constants::DEBUG, QList<int>() << m_gdbRunningContext);
|
ProjectExplorer::Constants::DEBUG, QList<int>() << m_gdbRunningContext);
|
||||||
mstart->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
|
mstart->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
|
||||||
|
|
||||||
@@ -648,7 +650,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
|
|||||||
Constants::DETACH, globalcontext);
|
Constants::DETACH, globalcontext);
|
||||||
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
|
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
|
||||||
|
|
||||||
cmd = am->registerAction(m_manager->m_stopAction,
|
cmd = am->registerAction(actions.stopAction,
|
||||||
Constants::INTERRUPT, globalcontext);
|
Constants::INTERRUPT, globalcontext);
|
||||||
cmd->setAttribute(Core::Command::CA_UpdateText);
|
cmd->setAttribute(Core::Command::CA_UpdateText);
|
||||||
cmd->setAttribute(Core::Command::CA_UpdateIcon);
|
cmd->setAttribute(Core::Command::CA_UpdateIcon);
|
||||||
@@ -656,7 +658,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
|
|||||||
cmd->setDefaultText(tr("Stop Debugger/Interrupt Debugger"));
|
cmd->setDefaultText(tr("Stop Debugger/Interrupt Debugger"));
|
||||||
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
|
mdebug->addAction(cmd, Core::Constants::G_DEFAULT_ONE);
|
||||||
|
|
||||||
cmd = am->registerAction(m_manager->m_resetAction,
|
cmd = am->registerAction(actions.resetAction,
|
||||||
Constants::RESET, globalcontext);
|
Constants::RESET, globalcontext);
|
||||||
cmd->setAttribute(Core::Command::CA_UpdateText);
|
cmd->setAttribute(Core::Command::CA_UpdateText);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Constants::RESET_KEY));
|
cmd->setDefaultKeySequence(QKeySequence(Constants::RESET_KEY));
|
||||||
@@ -668,17 +670,17 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
|
|||||||
cmd = am->registerAction(sep, QLatin1String("Debugger.Sep.Step"), globalcontext);
|
cmd = am->registerAction(sep, QLatin1String("Debugger.Sep.Step"), globalcontext);
|
||||||
mdebug->addAction(cmd);
|
mdebug->addAction(cmd);
|
||||||
|
|
||||||
cmd = am->registerAction(m_manager->m_nextAction,
|
cmd = am->registerAction(actions.nextAction,
|
||||||
Constants::NEXT, debuggercontext);
|
Constants::NEXT, debuggercontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Constants::NEXT_KEY));
|
cmd->setDefaultKeySequence(QKeySequence(Constants::NEXT_KEY));
|
||||||
mdebug->addAction(cmd);
|
mdebug->addAction(cmd);
|
||||||
|
|
||||||
cmd = am->registerAction(m_manager->m_stepAction,
|
cmd = am->registerAction(actions.stepAction,
|
||||||
Constants::STEP, debuggercontext);
|
Constants::STEP, debuggercontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Constants::STEP_KEY));
|
cmd->setDefaultKeySequence(QKeySequence(Constants::STEP_KEY));
|
||||||
mdebug->addAction(cmd);
|
mdebug->addAction(cmd);
|
||||||
|
|
||||||
cmd = am->registerAction(m_manager->m_stepOutAction,
|
cmd = am->registerAction(actions.stepOutAction,
|
||||||
Constants::STEPOUT, debuggercontext);
|
Constants::STEPOUT, debuggercontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Constants::STEPOUT_KEY));
|
cmd->setDefaultKeySequence(QKeySequence(Constants::STEPOUT_KEY));
|
||||||
mdebug->addAction(cmd);
|
mdebug->addAction(cmd);
|
||||||
@@ -687,22 +689,22 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
|
|||||||
Constants::STEP_BY_INSTRUCTION, debuggercontext);
|
Constants::STEP_BY_INSTRUCTION, debuggercontext);
|
||||||
mdebug->addAction(cmd);
|
mdebug->addAction(cmd);
|
||||||
|
|
||||||
cmd = am->registerAction(m_manager->m_runToLineAction,
|
cmd = am->registerAction(actions.runToLineAction,
|
||||||
Constants::RUN_TO_LINE, debuggercontext);
|
Constants::RUN_TO_LINE, debuggercontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Constants::RUN_TO_LINE_KEY));
|
cmd->setDefaultKeySequence(QKeySequence(Constants::RUN_TO_LINE_KEY));
|
||||||
mdebug->addAction(cmd);
|
mdebug->addAction(cmd);
|
||||||
|
|
||||||
cmd = am->registerAction(m_manager->m_runToFunctionAction,
|
cmd = am->registerAction(actions.runToFunctionAction,
|
||||||
Constants::RUN_TO_FUNCTION, debuggercontext);
|
Constants::RUN_TO_FUNCTION, debuggercontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Constants::RUN_TO_FUNCTION_KEY));
|
cmd->setDefaultKeySequence(QKeySequence(Constants::RUN_TO_FUNCTION_KEY));
|
||||||
mdebug->addAction(cmd);
|
mdebug->addAction(cmd);
|
||||||
|
|
||||||
cmd = am->registerAction(m_manager->m_jumpToLineAction,
|
cmd = am->registerAction(actions.jumpToLineAction,
|
||||||
Constants::JUMP_TO_LINE, debuggercontext);
|
Constants::JUMP_TO_LINE, debuggercontext);
|
||||||
mdebug->addAction(cmd);
|
mdebug->addAction(cmd);
|
||||||
|
|
||||||
#ifdef USE_REVERSE_DEBUGGING
|
#ifdef USE_REVERSE_DEBUGGING
|
||||||
cmd = am->registerAction(m_manager->m_reverseDirectionAction,
|
cmd = am->registerAction(actions.reverseDirectionAction,
|
||||||
Constants::REVERSE, debuggercontext);
|
Constants::REVERSE, debuggercontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Constants::REVERSE_KEY));
|
cmd->setDefaultKeySequence(QKeySequence(Constants::REVERSE_KEY));
|
||||||
mdebug->addAction(cmd);
|
mdebug->addAction(cmd);
|
||||||
@@ -713,7 +715,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
|
|||||||
cmd = am->registerAction(sep, QLatin1String("Debugger.Sep.Break"), globalcontext);
|
cmd = am->registerAction(sep, QLatin1String("Debugger.Sep.Break"), globalcontext);
|
||||||
mdebug->addAction(cmd);
|
mdebug->addAction(cmd);
|
||||||
|
|
||||||
cmd = am->registerAction(m_manager->m_breakAction,
|
cmd = am->registerAction(actions.breakAction,
|
||||||
Constants::TOGGLE_BREAK, cppeditorcontext);
|
Constants::TOGGLE_BREAK, cppeditorcontext);
|
||||||
cmd->setDefaultKeySequence(QKeySequence(Constants::TOGGLE_BREAK_KEY));
|
cmd->setDefaultKeySequence(QKeySequence(Constants::TOGGLE_BREAK_KEY));
|
||||||
mdebug->addAction(cmd);
|
mdebug->addAction(cmd);
|
||||||
@@ -724,7 +726,7 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
|
|||||||
cmd = am->registerAction(sep, QLatin1String("Debugger.Sep.Watch"), globalcontext);
|
cmd = am->registerAction(sep, QLatin1String("Debugger.Sep.Watch"), globalcontext);
|
||||||
mdebug->addAction(cmd);
|
mdebug->addAction(cmd);
|
||||||
|
|
||||||
cmd = am->registerAction(m_manager->m_watchAction,
|
cmd = am->registerAction(actions.watchAction,
|
||||||
Constants::ADD_TO_WATCH, cppeditorcontext);
|
Constants::ADD_TO_WATCH, cppeditorcontext);
|
||||||
//cmd->setDefaultKeySequence(QKeySequence(tr("ALT+D,ALT+W")));
|
//cmd->setDefaultKeySequence(QKeySequence(tr("ALT+D,ALT+W")));
|
||||||
mdebug->addAction(cmd);
|
mdebug->addAction(cmd);
|
||||||
|
|||||||
45
src/plugins/debugger/debuggerstringutils.h
Normal file
45
src/plugins/debugger/debuggerstringutils.h
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
/**************************************************************************
|
||||||
|
**
|
||||||
|
** This file is part of Qt Creator
|
||||||
|
**
|
||||||
|
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
||||||
|
**
|
||||||
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
||||||
|
**
|
||||||
|
** Commercial Usage
|
||||||
|
**
|
||||||
|
** 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.
|
||||||
|
**
|
||||||
|
** GNU Lesser General Public License Usage
|
||||||
|
**
|
||||||
|
** 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.
|
||||||
|
**
|
||||||
|
** If you are unsure which license is appropriate for your use, please
|
||||||
|
** contact the sales department at http://qt.nokia.com/contact.
|
||||||
|
**
|
||||||
|
**************************************************************************/
|
||||||
|
|
||||||
|
#ifndef DEBUGGERSTRINGUTILS_H
|
||||||
|
#define DEBUGGERSTRINGUTILS_H
|
||||||
|
|
||||||
|
#include <QtCore/QString>
|
||||||
|
|
||||||
|
namespace Debugger {
|
||||||
|
namespace Internal {
|
||||||
|
|
||||||
|
typedef QLatin1Char _c;
|
||||||
|
typedef QLatin1String __;
|
||||||
|
inline QString _(const char *s) { return QString::fromLatin1(s); }
|
||||||
|
inline QString _(const QByteArray &ba) { return QString::fromLatin1(ba, ba.size()); }
|
||||||
|
|
||||||
|
} // namespace Internal
|
||||||
|
} // namespace Debugger
|
||||||
|
#endif // DEBUGGERSTRINGUTILS_H
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
#include "debuggeractions.h"
|
#include "debuggeractions.h"
|
||||||
#include "gdbengine.h"
|
#include "gdbengine.h"
|
||||||
#include "procinterrupt.h"
|
#include "procinterrupt.h"
|
||||||
|
#include "debuggerstringutils.h"
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
#include "debuggeractions.h"
|
#include "debuggeractions.h"
|
||||||
#include "gdbengine.h"
|
#include "gdbengine.h"
|
||||||
|
#include "debuggerstringutils.h"
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
#include "debuggerconstants.h"
|
#include "debuggerconstants.h"
|
||||||
#include "debuggermanager.h"
|
#include "debuggermanager.h"
|
||||||
#include "debuggertooltip.h"
|
#include "debuggertooltip.h"
|
||||||
|
#include "debuggerstringutils.h"
|
||||||
#include "gdbmi.h"
|
#include "gdbmi.h"
|
||||||
|
|
||||||
#include "breakhandler.h"
|
#include "breakhandler.h"
|
||||||
@@ -58,6 +59,7 @@
|
|||||||
#include "debuggerdialogs.h"
|
#include "debuggerdialogs.h"
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
#include <utils/fancymainwindow.h>
|
||||||
#include <texteditor/itexteditor.h>
|
#include <texteditor/itexteditor.h>
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
|
||||||
@@ -224,6 +226,11 @@ DebuggerStartMode GdbEngine::startMode() const
|
|||||||
return m_startParameters->startMode;
|
return m_startParameters->startMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QMainWindow *GdbEngine::mainWindow() const
|
||||||
|
{
|
||||||
|
return m_manager->mainWindow();
|
||||||
|
}
|
||||||
|
|
||||||
GdbEngine::~GdbEngine()
|
GdbEngine::~GdbEngine()
|
||||||
{
|
{
|
||||||
// prevent sending error messages afterwards
|
// prevent sending error messages afterwards
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
class QAction;
|
class QAction;
|
||||||
class QAbstractItemModel;
|
class QAbstractItemModel;
|
||||||
class QWidget;
|
class QWidget;
|
||||||
|
class QMainWindow;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
@@ -271,7 +272,7 @@ private:
|
|||||||
bool showToolTip();
|
bool showToolTip();
|
||||||
|
|
||||||
// Convenience
|
// Convenience
|
||||||
QMainWindow *mainWindow() const { return m_manager->mainWindow(); }
|
QMainWindow *mainWindow() const;
|
||||||
DebuggerStartMode startMode() const;
|
DebuggerStartMode startMode() const;
|
||||||
qint64 inferiorPid() const { return m_manager->inferiorPid(); }
|
qint64 inferiorPid() const { return m_manager->inferiorPid(); }
|
||||||
|
|
||||||
|
|||||||
@@ -32,11 +32,14 @@
|
|||||||
#include "debuggeractions.h"
|
#include "debuggeractions.h"
|
||||||
#include "gdbengine.h"
|
#include "gdbengine.h"
|
||||||
#include "procinterrupt.h"
|
#include "procinterrupt.h"
|
||||||
|
#include "debuggerstringutils.h"
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
#include <utils/fancymainwindow.h>
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
|
||||||
#include <QtCore/QFileInfo>
|
#include <QtCore/QFileInfo>
|
||||||
|
#include <QtCore/QVariant>
|
||||||
#include <QtGui/QMessageBox>
|
#include <QtGui/QMessageBox>
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
|
|||||||
@@ -28,11 +28,12 @@
|
|||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "remotegdbadapter.h"
|
#include "remotegdbadapter.h"
|
||||||
|
#include "debuggerstringutils.h"
|
||||||
#include "debuggeractions.h"
|
#include "debuggeractions.h"
|
||||||
#include "gdbengine.h"
|
#include "gdbengine.h"
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
#include <utils/fancymainwindow.h>
|
||||||
|
|
||||||
#include <QtCore/QFileInfo>
|
#include <QtCore/QFileInfo>
|
||||||
#include <QtGui/QMessageBox>
|
#include <QtGui/QMessageBox>
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include "trkgdbadapter.h"
|
#include "trkgdbadapter.h"
|
||||||
#include "trkoptions.h"
|
#include "trkoptions.h"
|
||||||
|
#include "debuggerstringutils.h"
|
||||||
#ifndef STANDALONE_RUNNER
|
#ifndef STANDALONE_RUNNER
|
||||||
#include "gdbengine.h"
|
#include "gdbengine.h"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#include "tcfengine.h"
|
#include "tcfengine.h"
|
||||||
|
|
||||||
|
#include "debuggerstringutils.h"
|
||||||
#include "debuggerdialogs.h"
|
#include "debuggerdialogs.h"
|
||||||
#include "breakhandler.h"
|
#include "breakhandler.h"
|
||||||
#include "debuggerconstants.h"
|
#include "debuggerconstants.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user