2011-02-18 10:36:52 +01:00
|
|
|
/**************************************************************************
|
|
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
|
**
|
|
|
|
|
** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
|
|
|
|
**
|
|
|
|
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
|
|
|
|
**
|
|
|
|
|
** No Commercial Usage
|
|
|
|
|
**
|
|
|
|
|
** This file contains pre-release code and may not be distributed.
|
|
|
|
|
** You may use this file in accordance with the terms and conditions
|
|
|
|
|
** contained in the Technology Preview License Agreement accompanying
|
|
|
|
|
** this package.
|
|
|
|
|
**
|
|
|
|
|
** 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.
|
|
|
|
|
**
|
|
|
|
|
** 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.
|
|
|
|
|
**
|
|
|
|
|
** If you have questions regarding the use of this file, please contact
|
|
|
|
|
** Nokia at qt-info@nokia.com.
|
|
|
|
|
**
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
2010-08-18 13:54:12 +02:00
|
|
|
#ifndef QMLGDBENGINE_H
|
|
|
|
|
#define QMLGDBENGINE_H
|
|
|
|
|
|
|
|
|
|
#include "debuggerengine.h"
|
|
|
|
|
|
2010-09-13 13:30:35 +02:00
|
|
|
#include <QtCore/QScopedPointer>
|
|
|
|
|
|
2010-08-18 13:54:12 +02:00
|
|
|
namespace Debugger {
|
2010-11-22 10:20:31 +01:00
|
|
|
namespace Internal {
|
2010-12-03 12:07:32 +01:00
|
|
|
|
2010-11-15 17:47:21 +01:00
|
|
|
class QmlCppEnginePrivate;
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2010-09-08 14:25:33 +02:00
|
|
|
class DEBUGGER_EXPORT QmlCppEngine : public DebuggerEngine
|
2010-08-18 13:54:12 +02:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
2011-01-12 15:11:12 +01:00
|
|
|
|
2010-08-18 13:54:12 +02:00
|
|
|
public:
|
2011-02-24 16:50:15 +01:00
|
|
|
explicit QmlCppEngine(const DebuggerStartParameters &sp,
|
|
|
|
|
DebuggerEngineType slaveEngineType,
|
|
|
|
|
QString *errorMessage);
|
2011-01-14 14:25:02 +01:00
|
|
|
~QmlCppEngine();
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2011-02-17 10:08:57 +01:00
|
|
|
bool setToolTipExpression(const QPoint &mousePos,
|
2011-02-11 15:00:13 +01:00
|
|
|
TextEditor::ITextEditor * editor, const DebuggerToolTipContext &);
|
2011-01-14 14:25:02 +01:00
|
|
|
void updateWatchData(const WatchData &data,
|
2010-12-03 12:07:32 +01:00
|
|
|
const WatchUpdateFlags &flags);
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2011-01-14 14:25:02 +01:00
|
|
|
void watchPoint(const QPoint &);
|
|
|
|
|
void fetchMemory(MemoryAgent *, QObject *, quint64 addr, quint64 length);
|
|
|
|
|
void fetchDisassembler(DisassemblerAgent *);
|
|
|
|
|
void activateFrame(int index);
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2011-01-14 14:25:02 +01:00
|
|
|
void reloadModules();
|
|
|
|
|
void examineModules();
|
|
|
|
|
void loadSymbols(const QString &moduleName);
|
|
|
|
|
void loadAllSymbols();
|
|
|
|
|
void requestModuleSymbols(const QString &moduleName);
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2011-01-14 14:25:02 +01:00
|
|
|
void reloadRegisters();
|
|
|
|
|
void reloadSourceFiles();
|
|
|
|
|
void reloadFullStack();
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2011-01-14 14:25:02 +01:00
|
|
|
void setRegisterValue(int regnr, const QString &value);
|
|
|
|
|
unsigned debuggerCapabilities() const;
|
2011-02-28 10:58:21 +01:00
|
|
|
virtual bool canWatchWidgets() const;
|
|
|
|
|
virtual bool acceptsWatchesWhileRunning() const;
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2011-01-14 14:25:02 +01:00
|
|
|
bool isSynchronous() const;
|
|
|
|
|
QByteArray qtNamespace() const;
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2011-01-14 14:25:02 +01:00
|
|
|
void createSnapshot();
|
|
|
|
|
void updateAll();
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2011-01-14 14:25:02 +01:00
|
|
|
void attemptBreakpointSynchronization();
|
|
|
|
|
bool acceptsBreakpoint(BreakpointId id) const;
|
|
|
|
|
void selectThread(int index);
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2011-01-14 14:25:02 +01:00
|
|
|
void assignValueInDebugger(const WatchData *data,
|
2010-10-27 15:23:30 +02:00
|
|
|
const QString &expr, const QVariant &value);
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2010-09-13 13:30:35 +02:00
|
|
|
DebuggerEngine *cppEngine() const;
|
2011-01-14 14:25:02 +01:00
|
|
|
void handleRemoteSetupDone(int gdbServerPort, int qmlPort);
|
|
|
|
|
void handleRemoteSetupFailed(const QString &message);
|
2010-09-08 14:25:33 +02:00
|
|
|
|
2011-02-21 17:01:40 +01:00
|
|
|
void showMessage(const QString &msg, int channel = LogDebug,
|
|
|
|
|
int timeout = -1) const;
|
|
|
|
|
|
2010-08-18 13:54:12 +02:00
|
|
|
protected:
|
2011-01-14 14:25:02 +01:00
|
|
|
void detachDebugger();
|
|
|
|
|
void executeStep();
|
|
|
|
|
void executeStepOut();
|
|
|
|
|
void executeNext();
|
|
|
|
|
void executeStepI();
|
|
|
|
|
void executeNextI();
|
|
|
|
|
void executeReturn();
|
|
|
|
|
void continueInferior();
|
|
|
|
|
void interruptInferior();
|
|
|
|
|
void requestInterruptInferior();
|
|
|
|
|
|
2011-02-23 10:16:11 +01:00
|
|
|
void executeRunToLine(const ContextData &data);
|
2011-01-14 14:25:02 +01:00
|
|
|
void executeRunToFunction(const QString &functionName);
|
2011-02-23 10:16:11 +01:00
|
|
|
void executeJumpToLine(const ContextData &data);
|
2011-01-14 14:25:02 +01:00
|
|
|
void executeDebuggerCommand(const QString &command);
|
|
|
|
|
|
|
|
|
|
void setupEngine();
|
|
|
|
|
void setupInferior();
|
|
|
|
|
void runEngine();
|
|
|
|
|
void shutdownInferior();
|
|
|
|
|
void shutdownEngine();
|
|
|
|
|
|
|
|
|
|
void notifyInferiorRunOk();
|
|
|
|
|
void notifyInferiorSpontaneousStop();
|
|
|
|
|
void notifyEngineRunAndInferiorRunOk();
|
|
|
|
|
void notifyInferiorShutdownOk();
|
2010-08-18 13:54:12 +02:00
|
|
|
|
|
|
|
|
private:
|
2011-01-12 15:11:12 +01:00
|
|
|
void engineStateChanged(DebuggerState newState);
|
2011-01-14 14:25:02 +01:00
|
|
|
void setState(DebuggerState newState, bool forced = false);
|
|
|
|
|
void slaveEngineStateChanged(DebuggerEngine *slaveEngine, DebuggerState state);
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2011-01-19 14:34:25 +01:00
|
|
|
void readyToExecuteQmlStep();
|
2011-01-14 17:08:59 +01:00
|
|
|
|
2010-08-18 13:54:12 +02:00
|
|
|
private:
|
2010-12-03 12:07:32 +01:00
|
|
|
QScopedPointer<QmlCppEnginePrivate> d;
|
2010-08-18 13:54:12 +02:00
|
|
|
};
|
|
|
|
|
|
2010-12-03 12:07:32 +01:00
|
|
|
} // namespace Internal
|
2010-08-18 13:54:12 +02:00
|
|
|
} // namespace Debugger
|
|
|
|
|
|
|
|
|
|
#endif // QMLGDBENGINE_H
|