forked from qt-creator/qt-creator
Debugger: Export DebuggerManager and DebuggerStartParameters.
For device debugging. Move both from namespace Debugger::Internal to Debugger, export them, give DebuggerManager a static instance().
This commit is contained in:
@@ -36,11 +36,11 @@
|
|||||||
#include <QtCore/QAbstractItemModel>
|
#include <QtCore/QAbstractItemModel>
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
|
class DebuggerManager;
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class BreakpointMarker;
|
class BreakpointMarker;
|
||||||
class BreakHandler;
|
class BreakHandler;
|
||||||
class DebuggerManager;
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -368,7 +368,7 @@ bool CdbDebugEnginePrivate::init(QString *errorMessage)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
IDebuggerEngine *CdbDebugEngine::create(DebuggerManager *manager,
|
IDebuggerEngine *CdbDebugEngine::create(Debugger::DebuggerManager *manager,
|
||||||
const QSharedPointer<CdbOptions> &options,
|
const QSharedPointer<CdbOptions> &options,
|
||||||
QString *errorMessage)
|
QString *errorMessage)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,9 +36,10 @@
|
|||||||
#include <QtCore/QSharedPointer>
|
#include <QtCore/QSharedPointer>
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
|
class DebuggerManager;
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class DebuggerManager;
|
|
||||||
class DisassemblerViewAgent;
|
class DisassemblerViewAgent;
|
||||||
class CdbDebugEventCallback;
|
class CdbDebugEventCallback;
|
||||||
class CdbDebugOutput;
|
class CdbDebugOutput;
|
||||||
|
|||||||
@@ -42,9 +42,10 @@
|
|||||||
#include <QtCore/QMap>
|
#include <QtCore/QMap>
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
|
class DebuggerManager;
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class DebuggerManager;
|
|
||||||
class WatchHandler;
|
class WatchHandler;
|
||||||
class CdbStackFrameContext;
|
class CdbStackFrameContext;
|
||||||
class CdbStackTraceContext;
|
class CdbStackTraceContext;
|
||||||
|
|||||||
@@ -35,8 +35,10 @@
|
|||||||
#include <QtCore/QStringList>
|
#include <QtCore/QStringList>
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
|
||||||
class DebuggerManager;
|
class DebuggerManager;
|
||||||
|
|
||||||
|
namespace Internal {
|
||||||
|
|
||||||
class CdbDebugEngine;
|
class CdbDebugEngine;
|
||||||
|
|
||||||
// Base class for event callbacks that takes care
|
// Base class for event callbacks that takes care
|
||||||
|
|||||||
@@ -37,11 +37,11 @@
|
|||||||
#include <QtCore/QMap>
|
#include <QtCore/QMap>
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
struct CdbComInterfaces;
|
|
||||||
class DebuggerManager;
|
class DebuggerManager;
|
||||||
|
|
||||||
|
namespace Internal {
|
||||||
|
struct CdbComInterfaces;
|
||||||
|
|
||||||
/* For code clarity, all the stuff related to custom dumpers goes here.
|
/* For code clarity, all the stuff related to custom dumpers goes here.
|
||||||
* "Custom dumper" is a library compiled against the current
|
* "Custom dumper" is a library compiled against the current
|
||||||
* Qt containing functions to evaluate values of Qt classes
|
* Qt containing functions to evaluate values of Qt classes
|
||||||
|
|||||||
@@ -4,14 +4,12 @@ TARGET = Debugger
|
|||||||
# DEFINES += QT_USE_FAST_OPERATOR_PLUS
|
# DEFINES += QT_USE_FAST_OPERATOR_PLUS
|
||||||
# DEFINES += QT_USE_FAST_CONCATENATION
|
# DEFINES += QT_USE_FAST_CONCATENATION
|
||||||
# CONFIG += single
|
# CONFIG += single
|
||||||
|
|
||||||
include(../../qtcreatorplugin.pri)
|
include(../../qtcreatorplugin.pri)
|
||||||
include(../../plugins/coreplugin/coreplugin.pri)
|
include(debugger_dependencies.pri)
|
||||||
include(../../plugins/cpptools/cpptools.pri)
|
|
||||||
include(../../plugins/find/find.pri)
|
DEFINES += DEBUGGER_LIBRARY
|
||||||
include(../../plugins/projectexplorer/projectexplorer.pri)
|
|
||||||
include(../../plugins/texteditor/texteditor.pri)
|
|
||||||
include(../../libs/cplusplus/cplusplus.pri)
|
|
||||||
include(../../libs/utils/utils.pri)
|
|
||||||
INCLUDEPATH += $$PWD/../../libs/utils
|
INCLUDEPATH += $$PWD/../../libs/utils
|
||||||
QT += gui \
|
QT += gui \
|
||||||
network \
|
network \
|
||||||
@@ -23,6 +21,7 @@ HEADERS += breakhandler.h \
|
|||||||
debuggerconstants.h \
|
debuggerconstants.h \
|
||||||
debuggerdialogs.h \
|
debuggerdialogs.h \
|
||||||
debuggermanager.h \
|
debuggermanager.h \
|
||||||
|
debugger_global.h \
|
||||||
debuggeroutputwindow.h \
|
debuggeroutputwindow.h \
|
||||||
debuggerplugin.h \
|
debuggerplugin.h \
|
||||||
debuggerrunner.h \
|
debuggerrunner.h \
|
||||||
|
|||||||
7
src/plugins/debugger/debugger_dependencies.pri
Normal file
7
src/plugins/debugger/debugger_dependencies.pri
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
include(../../plugins/coreplugin/coreplugin.pri)
|
||||||
|
include(../../plugins/cpptools/cpptools.pri)
|
||||||
|
include(../../plugins/find/find.pri)
|
||||||
|
include(../../plugins/projectexplorer/projectexplorer.pri)
|
||||||
|
include(../../plugins/texteditor/texteditor.pri)
|
||||||
|
include(../../libs/cplusplus/cplusplus.pri)
|
||||||
|
include(../../libs/utils/utils.pri)
|
||||||
41
src/plugins/debugger/debugger_global.h
Normal file
41
src/plugins/debugger/debugger_global.h
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
/**************************************************************************
|
||||||
|
**
|
||||||
|
** 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 DEBUGGERGLOBAL_H
|
||||||
|
#define DEBUGGERGLOBAL_H
|
||||||
|
|
||||||
|
#include <QtCore/QtGlobal>
|
||||||
|
|
||||||
|
#if defined(DEBUGGER_LIBRARY)
|
||||||
|
# define DEBUGGER_EXPORT Q_DECL_EXPORT
|
||||||
|
#else
|
||||||
|
# define DEBUGGER_EXPORT Q_DECL_IMPORT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // DEBUGGERGLOBAL_H
|
||||||
@@ -42,9 +42,9 @@
|
|||||||
|
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
|
class DebuggerManager;
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class DebuggerManager;
|
|
||||||
struct DisassemblerViewAgentPrivate;
|
struct DisassemblerViewAgentPrivate;
|
||||||
|
|
||||||
class MemoryViewAgent : public QObject
|
class MemoryViewAgent : public QObject
|
||||||
|
|||||||
@@ -60,8 +60,6 @@ namespace Internal {
|
|||||||
}
|
}
|
||||||
} // namespace Constants
|
} // namespace Constants
|
||||||
|
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
enum DebuggerState
|
enum DebuggerState
|
||||||
{
|
{
|
||||||
DebuggerNotReady, // Debugger not started
|
DebuggerNotReady, // Debugger not started
|
||||||
@@ -118,7 +116,6 @@ enum LogChannel
|
|||||||
LogMisc
|
LogMisc
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
|
||||||
} // namespace Debugger
|
} // namespace Debugger
|
||||||
|
|
||||||
#endif // DEBUGGERCONSTANTS_H
|
#endif // DEBUGGERCONSTANTS_H
|
||||||
|
|||||||
@@ -155,8 +155,9 @@ IDebuggerEngine *createWinEngine(DebuggerManager *, bool /* cmdLineEnabled */, Q
|
|||||||
{ return 0; }
|
{ return 0; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
} // namespace Internal
|
||||||
|
|
||||||
QDebug operator<<(QDebug str, const DebuggerStartParameters &p)
|
DEBUGGER_EXPORT QDebug operator<<(QDebug str, const DebuggerStartParameters &p)
|
||||||
{
|
{
|
||||||
QDebug nospace = str.nospace();
|
QDebug nospace = str.nospace();
|
||||||
const QString sep = QString(QLatin1Char(','));
|
const QString sep = QString(QLatin1Char(','));
|
||||||
@@ -173,6 +174,7 @@ QDebug operator<<(QDebug str, const DebuggerStartParameters &p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
using namespace Constants;
|
using namespace Constants;
|
||||||
|
using namespace Debugger::Internal;
|
||||||
|
|
||||||
static const QString tooltipIName = "tooltip";
|
static const QString tooltipIName = "tooltip";
|
||||||
|
|
||||||
@@ -244,15 +246,17 @@ void DebuggerStartParameters::clear()
|
|||||||
//
|
//
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
static IDebuggerEngine *gdbEngine = 0;
|
static Debugger::Internal::IDebuggerEngine *gdbEngine = 0;
|
||||||
static IDebuggerEngine *scriptEngine = 0;
|
static Debugger::Internal::IDebuggerEngine *scriptEngine = 0;
|
||||||
static IDebuggerEngine *tcfEngine = 0;
|
static Debugger::Internal::IDebuggerEngine *tcfEngine = 0;
|
||||||
static IDebuggerEngine *winEngine = 0;
|
static Debugger::Internal::IDebuggerEngine *winEngine = 0;
|
||||||
|
|
||||||
struct DebuggerManagerPrivate {
|
struct DebuggerManagerPrivate {
|
||||||
|
|
||||||
DebuggerManagerPrivate();
|
DebuggerManagerPrivate();
|
||||||
|
|
||||||
|
static DebuggerManager *instance;
|
||||||
|
|
||||||
// FIXME: Remove engine-specific state
|
// FIXME: Remove engine-specific state
|
||||||
DebuggerStartParametersPtr m_startParameters;
|
DebuggerStartParametersPtr m_startParameters;
|
||||||
qint64 m_inferiorPid;
|
qint64 m_inferiorPid;
|
||||||
@@ -295,6 +299,8 @@ struct DebuggerManagerPrivate {
|
|||||||
DebuggerState m_state;
|
DebuggerState m_state;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
DebuggerManager *DebuggerManagerPrivate::instance = 0;
|
||||||
|
|
||||||
DebuggerManagerPrivate::DebuggerManagerPrivate() :
|
DebuggerManagerPrivate::DebuggerManagerPrivate() :
|
||||||
m_startParameters(new DebuggerStartParameters),
|
m_startParameters(new DebuggerStartParameters),
|
||||||
m_inferiorPid(0)
|
m_inferiorPid(0)
|
||||||
@@ -303,6 +309,7 @@ DebuggerManagerPrivate::DebuggerManagerPrivate() :
|
|||||||
|
|
||||||
DebuggerManager::DebuggerManager() : d(new DebuggerManagerPrivate)
|
DebuggerManager::DebuggerManager() : d(new DebuggerManagerPrivate)
|
||||||
{
|
{
|
||||||
|
DebuggerManagerPrivate::instance = this;
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -314,9 +321,15 @@ DebuggerManager::~DebuggerManager()
|
|||||||
doDelete(tcfEngine);
|
doDelete(tcfEngine);
|
||||||
doDelete(winEngine);
|
doDelete(winEngine);
|
||||||
#undef doDelete
|
#undef doDelete
|
||||||
|
DebuggerManagerPrivate::instance = 0;
|
||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DebuggerManager *DebuggerManager::instance()
|
||||||
|
{
|
||||||
|
return DebuggerManagerPrivate::instance;
|
||||||
|
}
|
||||||
|
|
||||||
void DebuggerManager::init()
|
void DebuggerManager::init()
|
||||||
{
|
{
|
||||||
d->m_state = DebuggerState(-1);
|
d->m_state = DebuggerState(-1);
|
||||||
@@ -337,7 +350,6 @@ void DebuggerManager::init()
|
|||||||
d->m_threadsWindow = new ThreadsWindow;
|
d->m_threadsWindow = new ThreadsWindow;
|
||||||
d->m_localsWindow = new WatchWindow(WatchWindow::LocalsType, this);
|
d->m_localsWindow = new WatchWindow(WatchWindow::LocalsType, this);
|
||||||
d->m_watchersWindow = new WatchWindow(WatchWindow::WatchersType, this);
|
d->m_watchersWindow = new WatchWindow(WatchWindow::WatchersType, this);
|
||||||
//d->m_tooltipWindow = new WatchWindow(WatchWindow::TooltipType, this);
|
|
||||||
d->m_statusTimer = new QTimer(this);
|
d->m_statusTimer = new QTimer(this);
|
||||||
|
|
||||||
d->m_mainWindow = new Core::Utils::FancyMainWindow;
|
d->m_mainWindow = new Core::Utils::FancyMainWindow;
|
||||||
@@ -430,10 +442,10 @@ void DebuggerManager::init()
|
|||||||
// Tooltip
|
// Tooltip
|
||||||
//QTreeView *tooltipView = qobject_cast<QTreeView *>(d->m_tooltipWindow);
|
//QTreeView *tooltipView = qobject_cast<QTreeView *>(d->m_tooltipWindow);
|
||||||
//tooltipView->setModel(d->m_watchHandler->model(TooltipsWatch));
|
//tooltipView->setModel(d->m_watchHandler->model(TooltipsWatch));
|
||||||
//qRegisterMetaType<WatchData>("Debugger::Internal::WatchData");
|
//qRegisterMetaType<WatchData>("WatchData");
|
||||||
qRegisterMetaType<WatchData>("WatchData");
|
qRegisterMetaType<WatchData>("WatchData");
|
||||||
connect(d->m_watchHandler, SIGNAL(watchDataUpdateNeeded(WatchData)),
|
connect(d->m_watchHandler, SIGNAL(watchDataUpdateNeeded(Debugger::Internal::WatchData)),
|
||||||
this, SLOT(updateWatchData(WatchData)));
|
this, SLOT(updateWatchData(Debugger::Internal::WatchData)));
|
||||||
|
|
||||||
d->m_actions.continueAction = new QAction(tr("Continue"), this);
|
d->m_actions.continueAction = new QAction(tr("Continue"), this);
|
||||||
d->m_actions.continueAction->setIcon(QIcon(":/debugger/images/debugger_continue_small.png"));
|
d->m_actions.continueAction->setIcon(QIcon(":/debugger/images/debugger_continue_small.png"));
|
||||||
@@ -822,7 +834,7 @@ void DebuggerManager::setToolTipExpression(const QPoint &mousePos, TextEditor::I
|
|||||||
d->m_engine->setToolTipExpression(mousePos, editor, cursorPos);
|
d->m_engine->setToolTipExpression(mousePos, editor, cursorPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerManager::updateWatchData(const WatchData &data)
|
void DebuggerManager::updateWatchData(const Debugger::Internal::WatchData &data)
|
||||||
{
|
{
|
||||||
if (d->m_engine)
|
if (d->m_engine)
|
||||||
d->m_engine->updateWatchData(data);
|
d->m_engine->updateWatchData(data);
|
||||||
@@ -1323,7 +1335,7 @@ void DebuggerManager::resetLocation()
|
|||||||
emit resetLocationRequested();
|
emit resetLocationRequested();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerManager::gotoLocation(const StackFrame &frame, bool setMarker)
|
void DebuggerManager::gotoLocation(const Debugger::Internal::StackFrame &frame, bool setMarker)
|
||||||
{
|
{
|
||||||
// connected to the plugin
|
// connected to the plugin
|
||||||
emit gotoLocationRequested(frame, setMarker);
|
emit gotoLocationRequested(frame, setMarker);
|
||||||
@@ -1697,6 +1709,5 @@ void DebuggerManager::runTest(const QString &fileName)
|
|||||||
//startNewDebugger(StartInternal);
|
//startNewDebugger(StartInternal);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
|
||||||
} // namespace Debugger
|
} // namespace Debugger
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
#ifndef DEBUGGER_DEBUGGERMANAGER_H
|
#ifndef DEBUGGER_DEBUGGERMANAGER_H
|
||||||
#define DEBUGGER_DEBUGGERMANAGER_H
|
#define DEBUGGER_DEBUGGERMANAGER_H
|
||||||
|
|
||||||
|
#include "debugger_global.h"
|
||||||
#include "debuggerconstants.h"
|
#include "debuggerconstants.h"
|
||||||
|
|
||||||
#include <QtCore/QObject>
|
#include <QtCore/QObject>
|
||||||
@@ -81,8 +82,17 @@ class ScriptEngine;
|
|||||||
class CdbDebugEngine;
|
class CdbDebugEngine;
|
||||||
struct CdbDebugEnginePrivate;
|
struct CdbDebugEnginePrivate;
|
||||||
struct DebuggerManagerActions;
|
struct DebuggerManagerActions;
|
||||||
|
class DebuggerPlugin;
|
||||||
|
class CdbDebugEventCallback;
|
||||||
|
class CdbDumperHelper;
|
||||||
|
class CdbExceptionLoggerEventCallback;
|
||||||
|
class GdbEngine;
|
||||||
|
class TcfEngine;
|
||||||
|
class CdbDebugEngine;
|
||||||
|
struct CdbDebugEnginePrivate;
|
||||||
|
} // namespace Internal
|
||||||
|
|
||||||
class DebuggerStartParameters
|
class DEBUGGER_EXPORT DebuggerStartParameters
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DebuggerStartParameters();
|
DebuggerStartParameters();
|
||||||
@@ -109,7 +119,8 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
typedef QSharedPointer<DebuggerStartParameters> DebuggerStartParametersPtr;
|
typedef QSharedPointer<DebuggerStartParameters> DebuggerStartParametersPtr;
|
||||||
QDebug operator<<(QDebug str, const DebuggerStartParameters &);
|
|
||||||
|
DEBUGGER_EXPORT QDebug operator<<(QDebug str, const DebuggerStartParameters &);
|
||||||
|
|
||||||
// Flags for initialization
|
// Flags for initialization
|
||||||
enum DebuggerEngineTypeFlags
|
enum DebuggerEngineTypeFlags
|
||||||
@@ -132,7 +143,7 @@ QDebug operator<<(QDebug d, DebuggerState state);
|
|||||||
|
|
||||||
struct DebuggerManagerPrivate;
|
struct DebuggerManagerPrivate;
|
||||||
|
|
||||||
class DebuggerManager : public QObject
|
class DEBUGGER_EXPORT DebuggerManager : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@@ -140,28 +151,30 @@ public:
|
|||||||
DebuggerManager();
|
DebuggerManager();
|
||||||
~DebuggerManager();
|
~DebuggerManager();
|
||||||
|
|
||||||
friend class IDebuggerEngine;
|
friend class Internal::IDebuggerEngine;
|
||||||
friend class DebuggerPlugin;
|
friend class Internal::DebuggerPlugin;
|
||||||
friend class CdbDebugEventCallback;
|
friend class Internal::CdbDebugEventCallback;
|
||||||
friend class CdbDumperHelper;
|
friend class Internal::CdbDumperHelper;
|
||||||
friend class CdbExceptionLoggerEventCallback;
|
friend class Internal::CdbExceptionLoggerEventCallback;
|
||||||
friend class GdbEngine;
|
friend class Internal::GdbEngine;
|
||||||
friend class ScriptEngine;
|
friend class Internal::ScriptEngine;
|
||||||
friend class TcfEngine;
|
friend class Internal::TcfEngine;
|
||||||
friend class CdbDebugEngine;
|
friend class Internal::CdbDebugEngine;
|
||||||
friend struct CdbDebugEnginePrivate;
|
friend struct Internal::CdbDebugEnginePrivate;
|
||||||
|
|
||||||
QList<Core::IOptionsPage*> initializeEngines(unsigned enabledTypeFlags);
|
QList<Core::IOptionsPage*> initializeEngines(unsigned enabledTypeFlags);
|
||||||
|
|
||||||
Core::Utils::FancyMainWindow *mainWindow() const;
|
Core::Utils::FancyMainWindow *mainWindow() const;
|
||||||
QLabel *statusLabel() const;
|
QLabel *statusLabel() const;
|
||||||
IDebuggerEngine *currentEngine() const;
|
Internal::IDebuggerEngine *currentEngine() const;
|
||||||
|
|
||||||
DebuggerStartParametersPtr startParameters() const;
|
DebuggerStartParametersPtr startParameters() const;
|
||||||
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);
|
||||||
|
|
||||||
|
static DebuggerManager *instance();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void startNewDebugger(const DebuggerStartParametersPtr &sp);
|
void startNewDebugger(const DebuggerStartParametersPtr &sp);
|
||||||
void exitDebugger();
|
void exitDebugger();
|
||||||
@@ -171,7 +184,7 @@ public slots:
|
|||||||
void setBusyCursor(bool on);
|
void setBusyCursor(bool on);
|
||||||
void queryCurrentTextEditor(QString *fileName, int *lineNumber, QObject **ed);
|
void queryCurrentTextEditor(QString *fileName, int *lineNumber, QObject **ed);
|
||||||
|
|
||||||
void gotoLocation(const StackFrame &frame, bool setLocationMarker);
|
void gotoLocation(const Debugger::Internal::StackFrame &frame, bool setLocationMarker);
|
||||||
void fileOpen(const QString &file);
|
void fileOpen(const QString &file);
|
||||||
void resetLocation();
|
void resetLocation();
|
||||||
|
|
||||||
@@ -194,7 +207,7 @@ public slots:
|
|||||||
void detachDebugger();
|
void detachDebugger();
|
||||||
|
|
||||||
void addToWatchWindow();
|
void addToWatchWindow();
|
||||||
void updateWatchData(const WatchData &data);
|
void updateWatchData(const Debugger::Internal::WatchData &data);
|
||||||
|
|
||||||
void sessionLoaded();
|
void sessionLoaded();
|
||||||
void aboutToUnloadSession();
|
void aboutToUnloadSession();
|
||||||
@@ -237,15 +250,15 @@ private slots:
|
|||||||
void startFailed();
|
void startFailed();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ModulesHandler *modulesHandler() const;
|
Internal::ModulesHandler *modulesHandler() const;
|
||||||
BreakHandler *breakHandler() const;
|
Internal::BreakHandler *breakHandler() const;
|
||||||
RegisterHandler *registerHandler() const;
|
Internal::RegisterHandler *registerHandler() const;
|
||||||
StackHandler *stackHandler() const;
|
Internal::StackHandler *stackHandler() const;
|
||||||
ThreadsHandler *threadsHandler() const;
|
Internal::ThreadsHandler *threadsHandler() const;
|
||||||
WatchHandler *watchHandler() const;
|
Internal::WatchHandler *watchHandler() const;
|
||||||
SourceFilesWindow *sourceFileWindow() const;
|
Internal::SourceFilesWindow *sourceFileWindow() const;
|
||||||
QWidget *threadsWindow() const;
|
QWidget *threadsWindow() const;
|
||||||
DebuggerManagerActions debuggerManagerActions() const;
|
Internal::DebuggerManagerActions debuggerManagerActions() const;
|
||||||
|
|
||||||
void notifyInferiorStopped();
|
void notifyInferiorStopped();
|
||||||
void notifyInferiorRunning();
|
void notifyInferiorRunning();
|
||||||
@@ -274,7 +287,7 @@ 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
|
||||||
QList<Symbol> moduleSymbols(const QString &moduleName);
|
QList<Internal::Symbol> moduleSymbols(const QString &moduleName);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void debuggingFinished();
|
void debuggingFinished();
|
||||||
@@ -283,7 +296,7 @@ signals:
|
|||||||
void debugModeRequested();
|
void debugModeRequested();
|
||||||
void previousModeRequested();
|
void previousModeRequested();
|
||||||
void statusMessageRequested(const QString &msg, int timeout); // -1 for 'forever'
|
void statusMessageRequested(const QString &msg, int timeout); // -1 for 'forever'
|
||||||
void gotoLocationRequested(const StackFrame &frame, bool setLocationMarker);
|
void gotoLocationRequested(const Debugger::Internal::StackFrame &frame, bool setLocationMarker);
|
||||||
void resetLocationRequested();
|
void resetLocationRequested();
|
||||||
void currentTextEditorRequested(QString *fileName, int *lineNumber, QObject **ob);
|
void currentTextEditorRequested(QString *fileName, int *lineNumber, QObject **ob);
|
||||||
void sessionValueRequested(const QString &name, QVariant *value);
|
void sessionValueRequested(const QString &name, QVariant *value);
|
||||||
@@ -301,14 +314,13 @@ private:
|
|||||||
|
|
||||||
void toggleBreakpoint(const QString &fileName, int lineNumber);
|
void toggleBreakpoint(const QString &fileName, int lineNumber);
|
||||||
void toggleBreakpointEnabled(const QString &fileName, int lineNumber);
|
void toggleBreakpointEnabled(const QString &fileName, int lineNumber);
|
||||||
BreakpointData *findBreakpoint(const QString &fileName, int lineNumber);
|
Internal::BreakpointData *findBreakpoint(const QString &fileName, int lineNumber);
|
||||||
void setToolTipExpression(const QPoint &mousePos,
|
void setToolTipExpression(const QPoint &mousePos,
|
||||||
TextEditor::ITextEditor *editor, int cursorPos);
|
TextEditor::ITextEditor *editor, int cursorPos);
|
||||||
|
|
||||||
DebuggerManagerPrivate *d;
|
DebuggerManagerPrivate *d;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
|
||||||
} // namespace Debugger
|
} // namespace Debugger
|
||||||
|
|
||||||
#endif // DEBUGGER_DEBUGGERMANAGER_H
|
#endif // DEBUGGER_DEBUGGERMANAGER_H
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ using namespace Find;
|
|||||||
|
|
||||||
#endif // GDBDEBUGGERLEAN
|
#endif // GDBDEBUGGERLEAN
|
||||||
|
|
||||||
|
using namespace Debugger;
|
||||||
using namespace Debugger::Internal;
|
using namespace Debugger::Internal;
|
||||||
|
|
||||||
static QChar charForChannel(int channel)
|
static QChar charForChannel(int channel)
|
||||||
|
|||||||
@@ -887,8 +887,8 @@ bool DebuggerPlugin::initialize(const QStringList &arguments, QString *errorMess
|
|||||||
|
|
||||||
connect(m_manager, SIGNAL(resetLocationRequested()),
|
connect(m_manager, SIGNAL(resetLocationRequested()),
|
||||||
this, SLOT(resetLocation()));
|
this, SLOT(resetLocation()));
|
||||||
connect(m_manager, SIGNAL(gotoLocationRequested(StackFrame,bool)),
|
connect(m_manager, SIGNAL(gotoLocationRequested(Debugger::Internal::StackFrame,bool)),
|
||||||
this, SLOT(gotoLocation(StackFrame,bool)));
|
this, SLOT(gotoLocation(Debugger::Internal::StackFrame,bool)));
|
||||||
connect(m_manager, SIGNAL(stateChanged(int)),
|
connect(m_manager, SIGNAL(stateChanged(int)),
|
||||||
this, SLOT(handleStateChanged(int)));
|
this, SLOT(handleStateChanged(int)));
|
||||||
connect(m_manager, SIGNAL(previousModeRequested()),
|
connect(m_manager, SIGNAL(previousModeRequested()),
|
||||||
@@ -1090,7 +1090,7 @@ void DebuggerPlugin::resetLocation()
|
|||||||
m_locationMark = 0;
|
m_locationMark = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebuggerPlugin::gotoLocation(const StackFrame &frame, bool setMarker)
|
void DebuggerPlugin::gotoLocation(const Debugger::Internal::StackFrame &frame, bool setMarker)
|
||||||
{
|
{
|
||||||
if (theDebuggerBoolSetting(StepByInstruction) || !frame.isUsable()) {
|
if (theDebuggerBoolSetting(StepByInstruction) || !frame.isUsable()) {
|
||||||
if (!m_disassemblerViewAgent)
|
if (!m_disassemblerViewAgent)
|
||||||
|
|||||||
@@ -55,10 +55,11 @@ class BaseTextMark;
|
|||||||
}
|
}
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
|
class DebuggerManager;
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class BreakpointData;
|
class BreakpointData;
|
||||||
class DebuggerManager;
|
|
||||||
class DebuggerRunControlFactory;
|
class DebuggerRunControlFactory;
|
||||||
class DebugMode;
|
class DebugMode;
|
||||||
class DisassemblerViewAgent;
|
class DisassemblerViewAgent;
|
||||||
@@ -96,7 +97,7 @@ private slots:
|
|||||||
int lineNumber, QMenu *menu);
|
int lineNumber, QMenu *menu);
|
||||||
|
|
||||||
void resetLocation();
|
void resetLocation();
|
||||||
void gotoLocation(const StackFrame &frame, bool setMarker);
|
void gotoLocation(const Debugger::Internal::StackFrame &frame, bool setMarker);
|
||||||
|
|
||||||
void breakpointSetRemoveMarginActionTriggered();
|
void breakpointSetRemoveMarginActionTriggered();
|
||||||
void breakpointEnableDisableMarginActionTriggered();
|
void breakpointEnableDisableMarginActionTriggered();
|
||||||
|
|||||||
@@ -40,9 +40,9 @@ class LocalApplicationRunConfiguration;
|
|||||||
}
|
}
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class DebuggerManager;
|
class DebuggerManager;
|
||||||
|
|
||||||
|
namespace Internal {
|
||||||
class StartData;
|
class StartData;
|
||||||
|
|
||||||
typedef QSharedPointer<ProjectExplorer::RunConfiguration>
|
typedef QSharedPointer<ProjectExplorer::RunConfiguration>
|
||||||
|
|||||||
@@ -55,11 +55,10 @@ class QMainWindow;
|
|||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
|
class DebuggerManager;
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class AbstractGdbAdapter;
|
class AbstractGdbAdapter;
|
||||||
class DebuggerManager;
|
|
||||||
class IDebuggerManagerAccessForEngines;
|
|
||||||
class GdbResponse;
|
class GdbResponse;
|
||||||
class GdbMi;
|
class GdbMi;
|
||||||
|
|
||||||
|
|||||||
@@ -50,22 +50,23 @@ class IOptionsPage;
|
|||||||
}
|
}
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
|
class DebuggerManager;
|
||||||
|
class DebuggerStartParameters;
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
class DebuggerStartParameters;
|
|
||||||
class DebuggerManager;
|
|
||||||
class DisassemblerViewAgent;
|
class DisassemblerViewAgent;
|
||||||
class MemoryViewAgent;
|
class MemoryViewAgent;
|
||||||
struct StackFrame;
|
struct StackFrame;
|
||||||
class Symbol;
|
class Symbol;
|
||||||
class WatchData;
|
class WatchData;
|
||||||
typedef QSharedPointer<DebuggerStartParameters> DebuggerStartParametersPtr;
|
|
||||||
|
|
||||||
class IDebuggerEngine : public QObject
|
class IDebuggerEngine : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
typedef QSharedPointer<DebuggerStartParameters> DebuggerStartParametersPtr;
|
||||||
|
|
||||||
IDebuggerEngine(DebuggerManager *manager, QObject *parent = 0)
|
IDebuggerEngine(DebuggerManager *manager, QObject *parent = 0)
|
||||||
: QObject(parent), m_manager(manager)
|
: QObject(parent), m_manager(manager)
|
||||||
{}
|
{}
|
||||||
|
|||||||
@@ -33,10 +33,10 @@
|
|||||||
#include <QTreeView>
|
#include <QTreeView>
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class DebuggerManager;
|
class DebuggerManager;
|
||||||
|
|
||||||
|
namespace Internal {
|
||||||
|
|
||||||
class ModulesWindow : public QTreeView
|
class ModulesWindow : public QTreeView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|||||||
@@ -30,13 +30,12 @@
|
|||||||
#ifndef DEBUGGER_REGISTERWINDOW_H
|
#ifndef DEBUGGER_REGISTERWINDOW_H
|
||||||
#define DEBUGGER_REGISTERWINDOW_H
|
#define DEBUGGER_REGISTERWINDOW_H
|
||||||
|
|
||||||
#include <QTreeView>
|
#include <QtGui/QTreeView>
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class DebuggerManager;
|
class DebuggerManager;
|
||||||
|
|
||||||
|
namespace Internal {
|
||||||
class RegisterWindow : public QTreeView
|
class RegisterWindow : public QTreeView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|||||||
@@ -39,9 +39,9 @@ class QModelIndex;
|
|||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
class DebuggerManager;
|
class DebuggerManager;
|
||||||
|
|
||||||
|
namespace Internal {
|
||||||
class DisassemblerViewAgent;
|
class DisassemblerViewAgent;
|
||||||
|
|
||||||
class StackWindow : public QTreeView
|
class StackWindow : public QTreeView
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ public:
|
|||||||
static QString watcherEditPlaceHolder();
|
static QString watcherEditPlaceHolder();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void watchDataUpdateNeeded(const WatchData &data);
|
void watchDataUpdateNeeded(const Debugger::Internal::WatchData &data);
|
||||||
void sessionValueRequested(const QString &name, QVariant *value);
|
void sessionValueRequested(const QString &name, QVariant *value);
|
||||||
void setSessionValueRequested(const QString &name, const QVariant &value);
|
void setSessionValueRequested(const QString &name, const QVariant &value);
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
#include "debuggeractions.h"
|
#include "debuggeractions.h"
|
||||||
#include "debuggeragents.h"
|
#include "debuggeragents.h"
|
||||||
#include "debuggerdialogs.h"
|
#include "debuggerdialogs.h"
|
||||||
|
#include "debuggermanager.h"
|
||||||
|
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
|
|
||||||
@@ -50,6 +51,7 @@
|
|||||||
#include <QtGui/QMenu>
|
#include <QtGui/QMenu>
|
||||||
#include <QtGui/QResizeEvent>
|
#include <QtGui/QResizeEvent>
|
||||||
|
|
||||||
|
using namespace Debugger;
|
||||||
using namespace Debugger::Internal;
|
using namespace Debugger::Internal;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
@@ -33,6 +33,8 @@
|
|||||||
#include <QtGui/QTreeView>
|
#include <QtGui/QTreeView>
|
||||||
|
|
||||||
namespace Debugger {
|
namespace Debugger {
|
||||||
|
class DebuggerManager;
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
@@ -41,8 +43,6 @@ namespace Internal {
|
|||||||
//
|
//
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
class DebuggerManager;
|
|
||||||
|
|
||||||
class WatchWindow : public QTreeView
|
class WatchWindow : public QTreeView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|||||||
Reference in New Issue
Block a user