Files
qt-creator/src/plugins/debugger/cdb/cdbdebugengine.h

120 lines
3.7 KiB
C
Raw Normal View History

/**************************************************************************
2009-02-20 17:07:00 +01:00
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
2009-02-20 17:07:00 +01:00
**
** Contact: Qt Software Information (qt-info@nokia.com)
**
** Commercial Usage
2009-02-20 17:07:00 +01:00
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
2009-02-20 17:07:00 +01:00
**
** GNU Lesser General Public License Usage
2009-02-20 17:07:00 +01:00
**
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
2009-02-20 17:07:00 +01:00
**
** If you are unsure which license is appropriate for your use, please
** contact the sales department at qt-sales@nokia.com.
2009-02-20 17:07:00 +01:00
**
**************************************************************************/
2009-02-20 17:07:00 +01:00
2009-02-09 13:07:38 +01:00
#ifndef DEBUGGER_CDBENGINE_H
#define DEBUGGER_CDBENGINE_H
2009-02-09 11:35:43 +01:00
#include "idebuggerengine.h"
#include "debuggermanager.h"
2009-02-09 13:07:38 +01:00
2009-02-09 11:35:43 +01:00
namespace Debugger {
namespace Internal {
class DebuggerManager;
2009-02-20 17:07:00 +01:00
class CdbDebugEventCallback;
class CdbDebugOutput;
struct CdbDebugEnginePrivate;
2009-02-09 11:35:43 +01:00
2009-02-09 13:07:38 +01:00
class CdbDebugEngine : public IDebuggerEngine
2009-02-09 11:35:43 +01:00
{
2009-02-23 16:13:35 +01:00
Q_DISABLE_COPY(CdbDebugEngine)
2009-02-09 11:35:43 +01:00
Q_OBJECT
explicit CdbDebugEngine(DebuggerManager *parent);
2009-02-23 16:13:35 +01:00
2009-02-09 11:35:43 +01:00
public:
2009-02-09 13:07:38 +01:00
~CdbDebugEngine();
2009-02-09 11:35:43 +01:00
2009-02-23 16:13:35 +01:00
// Factory function that returns 0 if the debug engine library cannot be found.
static IDebuggerEngine *create(DebuggerManager *parent);
2009-02-09 11:35:43 +01:00
virtual void shutdown();
virtual void setToolTipExpression(const QPoint &pos, const QString &exp);
virtual bool startDebugger();
virtual void exitDebugger();
virtual void updateWatchModel();
virtual void stepExec();
virtual void stepOutExec();
virtual void nextExec();
virtual void stepIExec();
virtual void nextIExec();
2009-02-20 14:56:36 +01:00
virtual void continueInferior();
2009-02-09 11:35:43 +01:00
virtual void interruptInferior();
virtual void runToLineExec(const QString &fileName, int lineNumber);
virtual void runToFunctionExec(const QString &functionName);
virtual void jumpToLineExec(const QString &fileName, int lineNumber);
virtual void assignValueInDebugger(const QString &expr, const QString &value);
virtual void executeDebuggerCommand(const QString &command);
virtual void activateFrame(int index);
virtual void selectThread(int index);
virtual void attemptBreakpointSynchronization();
virtual void loadSessionData();
virtual void saveSessionData();
virtual void reloadDisassembler();
virtual void reloadModules();
virtual void loadSymbols(const QString &moduleName);
virtual void loadAllSymbols();
virtual void reloadRegisters();
2009-02-20 14:56:36 +01:00
virtual void reloadSourceFiles();
2009-02-09 11:35:43 +01:00
protected:
void timerEvent(QTimerEvent*);
private slots:
void slotConsoleStubStarted();
void slotConsoleStubError(const QString &msg);
void slotConsoleStubTerminated();
2009-02-09 11:35:43 +01:00
private:
bool startAttachDebugger(qint64 pid, QString *errorMessage);
bool startDebuggerWithExecutable(DebuggerStartMode sm, QString *errorMessage);
2009-02-09 11:35:43 +01:00
void startWatchTimer();
void killWatchTimer();
void processTerminated(unsigned long exitCode);
2009-02-09 11:35:43 +01:00
2009-02-20 17:07:00 +01:00
CdbDebugEnginePrivate *m_d;
2009-02-09 11:35:43 +01:00
2009-02-20 17:07:00 +01:00
friend struct CdbDebugEnginePrivate;
2009-02-09 13:07:38 +01:00
friend class CdbDebugEventCallback;
friend class CdbDebugOutput;
2009-02-09 11:35:43 +01:00
};
} // namespace Internal
} // namespace Debugger
2009-02-09 13:07:38 +01:00
#endif // DEBUGGER_CDBENGINE_H