2010-06-16 11:08:54 +02: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).
|
2010-06-16 11:08:54 +02:00
|
|
|
**
|
2011-11-02 15:59:12 +01:00
|
|
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
2010-06-16 11:08:54 +02:00
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
|
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** 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.
|
2010-06-16 11:08:54 +02:00
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** In addition, as a special exception, Nokia gives you certain additional
|
2011-04-13 08:42:33 +02:00
|
|
|
** rights. These rights are described in the Nokia Qt LGPL Exception
|
2010-12-17 16:01:08 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** 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.
|
|
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** If you have questions regarding the use of this file, please contact
|
2011-11-02 15:59:12 +01:00
|
|
|
** Nokia at qt-info@nokia.com.
|
2010-06-16 11:08:54 +02:00
|
|
|
**
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
|
|
#ifndef DEBUGGER_DEBUGGERENGINE_H
|
|
|
|
|
#define DEBUGGER_DEBUGGERENGINE_H
|
|
|
|
|
|
|
|
|
|
#include "debugger_global.h"
|
|
|
|
|
#include "debuggerconstants.h"
|
2010-11-10 16:33:11 +01:00
|
|
|
#include "breakpoint.h" // For 'BreakpointId'
|
2010-10-19 11:14:03 +02:00
|
|
|
|
2010-06-16 11:08:54 +02:00
|
|
|
#include <QtCore/QObject>
|
|
|
|
|
#include <QtCore/QStringList>
|
|
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
class QDebug;
|
|
|
|
|
class QPoint;
|
2010-07-21 14:24:29 +02:00
|
|
|
class QMessageBox;
|
2011-01-10 10:14:23 +01:00
|
|
|
class QAbstractItemModel;
|
2010-06-16 11:08:54 +02:00
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
|
|
namespace TextEditor {
|
|
|
|
|
class ITextEditor;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace Core {
|
|
|
|
|
class IOptionsPage;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace Debugger {
|
|
|
|
|
|
2010-09-13 13:30:35 +02:00
|
|
|
class DebuggerEnginePrivate;
|
2010-11-08 15:19:13 +01:00
|
|
|
class DebuggerRunControl;
|
2011-01-10 10:14:23 +01:00
|
|
|
class DebuggerStartParameters;
|
2010-06-16 11:08:54 +02:00
|
|
|
|
|
|
|
|
DEBUGGER_EXPORT QDebug operator<<(QDebug str, const DebuggerStartParameters &);
|
|
|
|
|
DEBUGGER_EXPORT QDebug operator<<(QDebug str, DebuggerState state);
|
|
|
|
|
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2010-11-10 11:39:01 +01:00
|
|
|
class DebuggerPluginPrivate;
|
2010-12-14 12:29:32 +01:00
|
|
|
class DisassemblerAgent;
|
|
|
|
|
class MemoryAgent;
|
2010-06-16 11:08:54 +02:00
|
|
|
class WatchData;
|
|
|
|
|
class BreakHandler;
|
|
|
|
|
class ModulesHandler;
|
|
|
|
|
class RegisterHandler;
|
|
|
|
|
class StackHandler;
|
|
|
|
|
class StackFrame;
|
|
|
|
|
class SourceFilesHandler;
|
|
|
|
|
class ThreadsHandler;
|
|
|
|
|
class WatchHandler;
|
2010-11-16 11:48:17 +01:00
|
|
|
class BreakpointParameters;
|
2010-12-03 12:07:32 +01:00
|
|
|
class QmlCppEngine;
|
2011-02-11 15:00:13 +01:00
|
|
|
class DebuggerToolTipContext;
|
2011-04-19 12:17:48 +02:00
|
|
|
class MemoryMarkup;
|
2010-06-16 11:08:54 +02:00
|
|
|
|
2010-09-13 08:32:12 +02:00
|
|
|
struct WatchUpdateFlags
|
|
|
|
|
{
|
|
|
|
|
WatchUpdateFlags() : tryIncremental(false) {}
|
|
|
|
|
bool tryIncremental;
|
|
|
|
|
};
|
2010-11-08 15:19:13 +01:00
|
|
|
|
2010-12-16 19:06:33 +01:00
|
|
|
class Location
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
Location() { init(); }
|
|
|
|
|
Location(quint64 address) { init(); m_address = address; }
|
|
|
|
|
Location(const QString &file) { init(); m_fileName = file; }
|
|
|
|
|
Location(const QString &file, int line, bool marker = true)
|
|
|
|
|
{ init(); m_lineNumber = line; m_fileName = file; m_needsMarker = marker; }
|
2011-01-10 10:14:23 +01:00
|
|
|
Location(const StackFrame &frame, bool marker = true);
|
2010-12-16 19:06:33 +01:00
|
|
|
QString fileName() const { return m_fileName; }
|
|
|
|
|
QString functionName() const { return m_functionName; }
|
2011-07-04 09:29:28 +02:00
|
|
|
QString from() const { return m_from; }
|
2010-12-16 19:06:33 +01:00
|
|
|
int lineNumber() const { return m_lineNumber; }
|
|
|
|
|
void setNeedsRaise(bool on) { m_needsRaise = on; }
|
|
|
|
|
void setNeedsMarker(bool on) { m_needsMarker = on; }
|
|
|
|
|
void setFileName(const QString &fileName) { m_fileName = fileName; }
|
|
|
|
|
bool needsRaise() const { return m_needsRaise; }
|
|
|
|
|
bool needsMarker() const { return m_needsMarker; }
|
|
|
|
|
bool hasDebugInfo() const { return m_hasDebugInfo; }
|
|
|
|
|
quint64 address() const { return m_address; }
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void init() { m_needsMarker = false; m_needsRaise = true; m_lineNumber = -1;
|
|
|
|
|
m_address = 0; m_hasDebugInfo = true; }
|
|
|
|
|
bool m_needsMarker;
|
|
|
|
|
bool m_needsRaise;
|
|
|
|
|
bool m_hasDebugInfo;
|
|
|
|
|
int m_lineNumber;
|
|
|
|
|
QString m_fileName;
|
|
|
|
|
QString m_functionName;
|
2011-07-04 09:29:28 +02:00
|
|
|
QString m_from;
|
2010-12-16 19:06:33 +01:00
|
|
|
quint64 m_address;
|
|
|
|
|
};
|
|
|
|
|
|
2011-02-23 10:16:11 +01:00
|
|
|
class ContextData
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
ContextData() : lineNumber(0), address(0) {}
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
QString fileName;
|
|
|
|
|
int lineNumber;
|
|
|
|
|
quint64 address;
|
|
|
|
|
};
|
|
|
|
|
|
2010-09-13 13:30:35 +02:00
|
|
|
} // namespace Internal
|
2010-09-13 08:32:12 +02:00
|
|
|
|
2010-11-08 15:19:13 +01:00
|
|
|
|
2010-06-25 14:08:53 +02:00
|
|
|
// FIXME: DEBUGGER_EXPORT?
|
|
|
|
|
class DEBUGGER_EXPORT DebuggerEngine : public QObject
|
2010-06-16 11:08:54 +02:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2011-01-12 12:10:12 +01:00
|
|
|
explicit DebuggerEngine(const DebuggerStartParameters &sp,
|
2011-10-12 16:28:33 +02:00
|
|
|
DebuggerLanguages languages,
|
2011-01-12 12:10:12 +01:00
|
|
|
DebuggerEngine *parentEngine = 0);
|
2010-06-16 11:08:54 +02:00
|
|
|
virtual ~DebuggerEngine();
|
|
|
|
|
|
2011-01-12 13:43:23 +01:00
|
|
|
const DebuggerStartParameters &startParameters() const;
|
|
|
|
|
DebuggerStartParameters &startParameters();
|
|
|
|
|
|
2011-02-17 10:08:57 +01:00
|
|
|
virtual bool setToolTipExpression(const QPoint & mousePos,
|
2011-02-11 15:00:13 +01:00
|
|
|
TextEditor::ITextEditor *editor, const Internal::DebuggerToolTipContext &);
|
2010-07-08 18:10:50 +02:00
|
|
|
|
2010-09-13 13:30:35 +02:00
|
|
|
virtual void updateWatchData(const Internal::WatchData &data,
|
2010-10-27 14:21:33 +02:00
|
|
|
const Internal::WatchUpdateFlags & flags = Internal::WatchUpdateFlags());
|
2011-01-12 12:10:12 +01:00
|
|
|
virtual void startDebugger(DebuggerRunControl *runControl);
|
2010-09-13 13:30:35 +02:00
|
|
|
|
|
|
|
|
virtual void watchPoint(const QPoint &);
|
2011-04-19 12:17:48 +02:00
|
|
|
|
|
|
|
|
enum MemoryViewFlags
|
|
|
|
|
{
|
|
|
|
|
MemoryReadOnly = 0x1, //!< Read-only.
|
|
|
|
|
MemoryTrackRegister = 0x2, //!< Address parameter is register number to track
|
|
|
|
|
MemoryView = 0x4 //!< Open a separate view (using the pos-parameter).
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
virtual void openMemoryView(quint64 startAddr, unsigned flags,
|
|
|
|
|
const QList<Internal::MemoryMarkup> &ml,
|
|
|
|
|
const QPoint &pos,
|
|
|
|
|
const QString &title = QString(), QWidget *parent = 0);
|
2010-12-14 12:29:32 +01:00
|
|
|
virtual void fetchMemory(Internal::MemoryAgent *, QObject *,
|
2010-09-13 13:30:35 +02:00
|
|
|
quint64 addr, quint64 length);
|
2011-02-25 13:21:54 +01:00
|
|
|
virtual void changeMemory(Internal::MemoryAgent *, QObject *,
|
|
|
|
|
quint64 addr, const QByteArray &data);
|
2010-12-13 18:17:31 +01:00
|
|
|
virtual void updateMemoryViews();
|
2010-12-16 19:06:33 +01:00
|
|
|
virtual void openDisassemblerView(const Internal::Location &location);
|
2010-12-14 12:29:32 +01:00
|
|
|
virtual void fetchDisassembler(Internal::DisassemblerAgent *);
|
2010-09-13 13:30:35 +02:00
|
|
|
virtual void activateFrame(int index);
|
|
|
|
|
|
|
|
|
|
virtual void reloadModules();
|
|
|
|
|
virtual void examineModules();
|
|
|
|
|
virtual void loadSymbols(const QString &moduleName);
|
2010-12-21 13:34:59 +01:00
|
|
|
virtual void loadSymbolsForStack();
|
2010-09-13 13:30:35 +02:00
|
|
|
virtual void loadAllSymbols();
|
|
|
|
|
virtual void requestModuleSymbols(const QString &moduleName);
|
|
|
|
|
|
|
|
|
|
virtual void reloadRegisters();
|
|
|
|
|
virtual void reloadSourceFiles();
|
|
|
|
|
virtual void reloadFullStack();
|
2010-07-08 18:10:50 +02:00
|
|
|
|
|
|
|
|
virtual void setRegisterValue(int regnr, const QString &value);
|
2010-09-13 13:30:35 +02:00
|
|
|
virtual void addOptionPages(QList<Core::IOptionsPage*> *) const;
|
2012-01-12 20:28:17 +01:00
|
|
|
virtual bool hasCapability(unsigned cap) const = 0;
|
2010-07-08 18:10:50 +02:00
|
|
|
|
2010-09-13 13:30:35 +02:00
|
|
|
virtual bool isSynchronous() const;
|
|
|
|
|
virtual QByteArray qtNamespace() const;
|
2010-07-08 18:10:50 +02:00
|
|
|
|
2010-09-13 13:30:35 +02:00
|
|
|
virtual void createSnapshot();
|
|
|
|
|
virtual void updateAll();
|
2010-07-08 18:10:50 +02:00
|
|
|
|
2011-06-24 16:25:30 +02:00
|
|
|
typedef Internal::BreakpointModelId BreakpointModelId;
|
2010-11-10 16:33:11 +01:00
|
|
|
virtual bool stateAcceptsBreakpointChanges() const { return true; }
|
|
|
|
|
virtual void attemptBreakpointSynchronization();
|
2011-06-24 16:25:30 +02:00
|
|
|
virtual bool acceptsBreakpoint(BreakpointModelId id) const = 0;
|
|
|
|
|
virtual void insertBreakpoint(BreakpointModelId id); // FIXME: make pure
|
|
|
|
|
virtual void removeBreakpoint(BreakpointModelId id); // FIXME: make pure
|
|
|
|
|
virtual void changeBreakpoint(BreakpointModelId id); // FIXME: make pure
|
2010-07-08 18:10:50 +02:00
|
|
|
|
2011-02-16 12:41:06 +01:00
|
|
|
virtual bool acceptsDebuggerCommands() const { return true; }
|
2010-11-08 15:19:13 +01:00
|
|
|
virtual void assignValueInDebugger(const Internal::WatchData *data,
|
|
|
|
|
const QString &expr, const QVariant &value);
|
2010-11-10 16:33:11 +01:00
|
|
|
virtual void selectThread(int index);
|
2010-07-21 14:24:29 +02:00
|
|
|
|
2010-12-10 12:41:44 +01:00
|
|
|
virtual void handleRemoteSetupDone(int gdbServerPort, int qmlPort);
|
|
|
|
|
virtual void handleRemoteSetupFailed(const QString &message);
|
|
|
|
|
|
2011-01-12 12:10:12 +01:00
|
|
|
virtual Internal::ModulesHandler *modulesHandler() const;
|
|
|
|
|
virtual Internal::RegisterHandler *registerHandler() const;
|
|
|
|
|
virtual Internal::StackHandler *stackHandler() const;
|
|
|
|
|
virtual Internal::ThreadsHandler *threadsHandler() const;
|
|
|
|
|
virtual Internal::WatchHandler *watchHandler() const;
|
|
|
|
|
virtual Internal::SourceFilesHandler *sourceFilesHandler() const;
|
|
|
|
|
virtual Internal::BreakHandler *breakHandler() const;
|
2010-06-16 11:08:54 +02:00
|
|
|
|
2010-08-18 13:54:12 +02:00
|
|
|
virtual QAbstractItemModel *modulesModel() const;
|
|
|
|
|
virtual QAbstractItemModel *registerModel() const;
|
|
|
|
|
virtual QAbstractItemModel *stackModel() const;
|
|
|
|
|
virtual QAbstractItemModel *threadsModel() const;
|
|
|
|
|
virtual QAbstractItemModel *localsModel() const;
|
|
|
|
|
virtual QAbstractItemModel *watchersModel() const;
|
|
|
|
|
virtual QAbstractItemModel *returnModel() const;
|
2011-02-11 15:00:13 +01:00
|
|
|
virtual QAbstractItemModel *toolTipsModel() const;
|
2010-08-18 13:54:12 +02:00
|
|
|
virtual QAbstractItemModel *sourceFilesModel() const;
|
2010-06-16 11:08:54 +02:00
|
|
|
|
2010-07-21 11:02:51 +02:00
|
|
|
void progressPing();
|
2010-06-22 15:14:44 +02:00
|
|
|
void handleFinished();
|
2010-07-20 18:31:35 +02:00
|
|
|
void handleStartFailed();
|
2010-06-16 11:08:54 +02:00
|
|
|
bool debuggerActionsEnabled() const;
|
|
|
|
|
static bool debuggerActionsEnabled(DebuggerState state);
|
|
|
|
|
|
|
|
|
|
DebuggerState state() const;
|
2010-07-09 17:07:59 +02:00
|
|
|
DebuggerState lastGoodState() const;
|
|
|
|
|
DebuggerState targetState() const;
|
2010-09-13 13:30:35 +02:00
|
|
|
bool isDying() const;
|
2010-06-16 11:08:54 +02:00
|
|
|
|
|
|
|
|
// Dumper stuff (common to cdb and gdb).
|
|
|
|
|
bool qtDumperLibraryEnabled() const;
|
|
|
|
|
QString qtDumperLibraryName() const;
|
|
|
|
|
QStringList qtDumperLibraryLocations() const;
|
2010-07-21 12:04:20 +02:00
|
|
|
void showQtDumperLibraryWarning(const QString &details);
|
2010-06-16 11:08:54 +02:00
|
|
|
|
|
|
|
|
static const char *stateName(int s);
|
|
|
|
|
|
|
|
|
|
void notifyInferiorPid(qint64 pid);
|
|
|
|
|
qint64 inferiorPid() const;
|
|
|
|
|
bool isReverseDebugging() const;
|
2010-06-22 15:37:27 +02:00
|
|
|
void handleCommand(int role, const QVariant &value);
|
2010-06-16 11:08:54 +02:00
|
|
|
|
2010-07-09 08:48:33 +02:00
|
|
|
// Convenience
|
2011-02-21 17:01:40 +01:00
|
|
|
Q_SLOT virtual void showMessage(const QString &msg, int channel = LogDebug,
|
2010-12-14 12:21:29 +01:00
|
|
|
int timeout = -1) const;
|
2010-07-14 16:01:53 +02:00
|
|
|
Q_SLOT void showStatusMessage(const QString &msg, int timeout = -1) const;
|
2010-07-09 08:48:33 +02:00
|
|
|
|
2011-10-12 17:26:18 +02:00
|
|
|
virtual void resetLocation();
|
2010-12-16 19:06:33 +01:00
|
|
|
virtual void gotoLocation(const Internal::Location &location);
|
2010-07-09 17:07:59 +02:00
|
|
|
virtual void quitDebugger(); // called by DebuggerRunControl
|
2011-10-31 17:36:08 +01:00
|
|
|
virtual void abortDebugger(); // called by DebuggerPlugin
|
2010-06-16 11:08:54 +02:00
|
|
|
|
2010-10-27 14:21:33 +02:00
|
|
|
virtual void updateViews();
|
2010-10-28 08:55:50 +02:00
|
|
|
bool isSlaveEngine() const;
|
2011-01-14 14:25:02 +01:00
|
|
|
bool isMasterEngine() const;
|
2011-01-12 13:43:23 +01:00
|
|
|
DebuggerEngine *masterEngine() const;
|
2010-10-27 14:21:33 +02:00
|
|
|
|
2011-10-12 16:28:33 +02:00
|
|
|
DebuggerLanguages languages() const;
|
|
|
|
|
|
2011-01-19 14:34:25 +01:00
|
|
|
virtual bool setupQmlStep(bool /*on*/) { return false; }
|
|
|
|
|
virtual void readyToExecuteQmlStep() {}
|
2011-01-14 17:08:59 +01:00
|
|
|
|
2011-01-24 16:58:35 +01:00
|
|
|
virtual bool canDisplayTooltip() const { return state() == InferiorStopOk; }
|
|
|
|
|
|
2011-02-11 14:20:23 +01:00
|
|
|
virtual void notifyInferiorIll();
|
|
|
|
|
|
2010-08-18 13:54:12 +02:00
|
|
|
signals:
|
2011-02-04 16:07:58 +01:00
|
|
|
void stateChanged(const Debugger::DebuggerState &state);
|
2011-02-11 15:00:13 +01:00
|
|
|
// A new stack frame is on display including locals.
|
|
|
|
|
void stackFrameCompleted();
|
2010-10-27 14:21:33 +02:00
|
|
|
void updateViewsRequested();
|
2010-12-10 12:41:44 +01:00
|
|
|
/*
|
2010-12-16 19:06:33 +01:00
|
|
|
* For "external" clients of a debugger run control that needs to do
|
2010-12-10 12:41:44 +01:00
|
|
|
* further setup before the debugger is started (e.g. Maemo).
|
2012-01-13 15:01:44 +01:00
|
|
|
* Afterwards, handleRemoteSetupDone() or handleRemoteSetupFailed() must be called
|
2010-12-10 12:41:44 +01:00
|
|
|
* to continue or abort debugging, respectively.
|
|
|
|
|
* This signal is only emitted if the start parameters indicate that
|
|
|
|
|
* a server start script should be used, but none is given.
|
|
|
|
|
*/
|
|
|
|
|
void requestRemoteSetup();
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2010-06-16 11:08:54 +02:00
|
|
|
protected:
|
2010-08-11 09:46:39 +02:00
|
|
|
// The base notify*() function implementation should be sufficient
|
|
|
|
|
// in most cases, but engines are free to override them to do some
|
|
|
|
|
// engine specific cleanup like stopping timers etc.
|
|
|
|
|
virtual void notifyEngineSetupOk();
|
|
|
|
|
virtual void notifyEngineSetupFailed();
|
|
|
|
|
virtual void notifyEngineRunFailed();
|
2010-06-16 11:08:54 +02:00
|
|
|
|
2010-08-11 09:46:39 +02:00
|
|
|
virtual void notifyInferiorSetupOk();
|
|
|
|
|
virtual void notifyInferiorSetupFailed();
|
2010-07-08 18:10:50 +02:00
|
|
|
|
2010-08-11 09:46:39 +02:00
|
|
|
virtual void notifyEngineRunAndInferiorRunOk();
|
|
|
|
|
virtual void notifyEngineRunAndInferiorStopOk();
|
|
|
|
|
virtual void notifyInferiorUnrunnable(); // Called by CoreAdapter.
|
2010-07-13 08:41:27 +02:00
|
|
|
|
|
|
|
|
// Use notifyInferiorRunRequested() plus notifyInferiorRunOk() instead.
|
2010-08-11 09:46:39 +02:00
|
|
|
//virtual void notifyInferiorSpontaneousRun();
|
2010-07-09 17:07:59 +02:00
|
|
|
|
2010-08-11 09:46:39 +02:00
|
|
|
virtual void notifyInferiorRunRequested();
|
|
|
|
|
virtual void notifyInferiorRunOk();
|
|
|
|
|
virtual void notifyInferiorRunFailed();
|
2010-07-09 17:07:59 +02:00
|
|
|
|
2010-08-11 09:46:39 +02:00
|
|
|
virtual void notifyInferiorStopOk();
|
|
|
|
|
virtual void notifyInferiorSpontaneousStop();
|
|
|
|
|
virtual void notifyInferiorStopFailed();
|
|
|
|
|
virtual void notifyInferiorExited();
|
2010-07-09 17:07:59 +02:00
|
|
|
|
2010-08-11 09:46:39 +02:00
|
|
|
virtual void notifyInferiorShutdownOk();
|
|
|
|
|
virtual void notifyInferiorShutdownFailed();
|
2010-07-09 17:07:59 +02:00
|
|
|
|
2010-08-11 09:46:39 +02:00
|
|
|
virtual void notifyEngineSpontaneousShutdown();
|
|
|
|
|
virtual void notifyEngineShutdownOk();
|
|
|
|
|
virtual void notifyEngineShutdownFailed();
|
2010-07-09 08:48:33 +02:00
|
|
|
|
2010-08-11 09:46:39 +02:00
|
|
|
virtual void notifyEngineIll();
|
2010-07-09 08:48:33 +02:00
|
|
|
|
2010-07-09 17:07:59 +02:00
|
|
|
virtual void setupEngine() = 0;
|
|
|
|
|
virtual void setupInferior() = 0;
|
|
|
|
|
virtual void runEngine() = 0;
|
|
|
|
|
virtual void shutdownInferior() = 0;
|
|
|
|
|
virtual void shutdownEngine() = 0;
|
2010-07-08 18:10:50 +02:00
|
|
|
|
2011-01-12 13:43:23 +01:00
|
|
|
virtual void detachDebugger();
|
|
|
|
|
virtual void exitDebugger();
|
|
|
|
|
virtual void executeStep();
|
2011-10-31 17:36:08 +01:00
|
|
|
virtual void executeStepOut();
|
2011-01-12 13:43:23 +01:00
|
|
|
virtual void executeNext();
|
|
|
|
|
virtual void executeStepI();
|
|
|
|
|
virtual void executeNextI();
|
|
|
|
|
virtual void executeReturn();
|
|
|
|
|
|
|
|
|
|
virtual void continueInferior();
|
|
|
|
|
virtual void interruptInferior();
|
|
|
|
|
virtual void requestInterruptInferior();
|
|
|
|
|
|
2011-02-23 10:16:11 +01:00
|
|
|
virtual void executeRunToLine(const Internal::ContextData &data);
|
2011-01-12 13:43:23 +01:00
|
|
|
virtual void executeRunToFunction(const QString &functionName);
|
2011-02-23 10:16:11 +01:00
|
|
|
virtual void executeJumpToLine(const Internal::ContextData &data);
|
2011-01-12 13:43:23 +01:00
|
|
|
virtual void executeDebuggerCommand(const QString &command);
|
|
|
|
|
|
|
|
|
|
virtual void frameUp();
|
|
|
|
|
virtual void frameDown();
|
|
|
|
|
|
2011-01-14 14:25:02 +01:00
|
|
|
DebuggerRunControl *runControl() const;
|
2010-07-08 15:06:09 +02:00
|
|
|
|
2011-06-24 16:25:30 +02:00
|
|
|
static QString msgWatchpointByAddressTriggered(BreakpointModelId id,
|
2010-11-26 09:58:34 +01:00
|
|
|
int number, quint64 address);
|
2011-06-24 16:25:30 +02:00
|
|
|
static QString msgWatchpointByAddressTriggered(BreakpointModelId id,
|
2010-11-26 09:58:34 +01:00
|
|
|
int number, quint64 address, const QString &threadId);
|
2011-06-24 16:25:30 +02:00
|
|
|
static QString msgWatchpointByExpressionTriggered(BreakpointModelId id,
|
2011-05-10 15:57:33 +02:00
|
|
|
int number, const QString &expr);
|
2011-06-24 16:25:30 +02:00
|
|
|
static QString msgWatchpointByExpressionTriggered(BreakpointModelId id,
|
2011-05-10 15:57:33 +02:00
|
|
|
int number, const QString &expr, const QString &threadId);
|
2011-06-24 16:25:30 +02:00
|
|
|
static QString msgBreakpointTriggered(BreakpointModelId id,
|
2010-11-26 09:58:34 +01:00
|
|
|
int number, const QString &threadId);
|
2010-11-17 17:16:34 +01:00
|
|
|
static QString msgStopped(const QString &reason = QString());
|
|
|
|
|
static QString msgStoppedBySignal(const QString &meaning, const QString &name);
|
2010-11-26 09:58:34 +01:00
|
|
|
static QString msgStoppedByException(const QString &description,
|
|
|
|
|
const QString &threadId);
|
2010-11-17 17:16:34 +01:00
|
|
|
static QString msgInterrupted();
|
2010-11-26 09:58:34 +01:00
|
|
|
void showStoppedBySignalMessageBox(const QString meaning, QString name);
|
2010-11-17 17:16:34 +01:00
|
|
|
void showStoppedByExceptionMessageBox(const QString &description);
|
|
|
|
|
|
2010-11-26 13:06:03 +01:00
|
|
|
static bool isCppBreakpoint(const Internal::BreakpointParameters &p);
|
|
|
|
|
|
2011-01-14 14:25:02 +01:00
|
|
|
bool isStateDebugging() const;
|
|
|
|
|
void setStateDebugging(bool on);
|
|
|
|
|
|
2011-01-14 18:16:40 +01:00
|
|
|
virtual void setupSlaveInferior();
|
|
|
|
|
virtual void setupSlaveEngine();
|
|
|
|
|
virtual void runSlaveEngine();
|
|
|
|
|
virtual void shutdownSlaveEngine();
|
|
|
|
|
|
2011-01-17 10:07:13 +01:00
|
|
|
virtual void slaveEngineStateChanged(DebuggerEngine *engine,
|
|
|
|
|
DebuggerState state);
|
|
|
|
|
|
2011-11-25 16:29:25 +01:00
|
|
|
virtual void handleAutoTests();
|
|
|
|
|
|
2010-06-22 17:18:29 +02:00
|
|
|
private:
|
2010-11-18 17:37:56 +01:00
|
|
|
// Wrapper engine needs access to state of its subengines.
|
2010-12-03 12:07:32 +01:00
|
|
|
friend class Internal::QmlCppEngine;
|
2011-01-12 13:43:23 +01:00
|
|
|
friend class Internal::DebuggerPluginPrivate;
|
2011-01-24 16:30:34 +01:00
|
|
|
friend class QmlAdapter;
|
2011-01-12 13:43:23 +01:00
|
|
|
|
2011-01-14 14:25:02 +01:00
|
|
|
virtual void setState(DebuggerState state, bool forced = false);
|
2010-11-18 17:37:56 +01:00
|
|
|
|
2010-07-08 18:10:50 +02:00
|
|
|
friend class DebuggerEnginePrivate;
|
2010-06-16 11:08:54 +02:00
|
|
|
DebuggerEnginePrivate *d;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Debugger
|
|
|
|
|
|
2011-02-23 10:16:11 +01:00
|
|
|
Q_DECLARE_METATYPE(Debugger::Internal::ContextData)
|
|
|
|
|
|
2010-06-16 11:08:54 +02:00
|
|
|
#endif // DEBUGGER_DEBUGGERENGINE_H
|