2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2011-02-18 10:36:52 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
|
|
|
|
** Contact: http://www.qt-project.org/legal
|
2011-02-18 10:36:52 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2011-02-18 10:36:52 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and Digia. For licensing terms and
|
|
|
|
|
** conditions see http://qt.digia.com/licensing. For further information
|
|
|
|
|
** use the contact form at http://qt.digia.com/contact-us.
|
2011-02-18 10:36:52 +01:00
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
2012-10-02 09:12:39 +02: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.
|
|
|
|
|
**
|
|
|
|
|
** In addition, as a special exception, Digia gives you certain additional
|
|
|
|
|
** rights. These rights are described in the Digia Qt LGPL Exception
|
2011-02-18 10:36:52 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2011-02-18 10:36:52 +01:00
|
|
|
|
2010-08-18 13:54:12 +02:00
|
|
|
#ifndef QMLGDBENGINE_H
|
|
|
|
|
#define QMLGDBENGINE_H
|
|
|
|
|
|
|
|
|
|
#include "debuggerengine.h"
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
2012-04-18 14:20:54 +02:00
|
|
|
class 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:
|
2012-08-15 13:21:37 +02:00
|
|
|
QmlCppEngine(const DebuggerStartParameters &sp, QString *errorMessage);
|
2011-01-14 14:25:02 +01:00
|
|
|
~QmlCppEngine();
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2012-03-30 15:30:46 +02:00
|
|
|
bool canDisplayTooltip() const;
|
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);
|
2012-01-12 20:28:17 +01:00
|
|
|
bool hasCapability(unsigned cap) 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();
|
2011-06-24 16:25:30 +02:00
|
|
|
bool acceptsBreakpoint(BreakpointModelId id) const;
|
2011-01-14 14:25:02 +01:00
|
|
|
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-09-21 16:39:45 +02:00
|
|
|
DebuggerEngine *qmlEngine() const;
|
|
|
|
|
|
2012-06-13 11:29:26 +02:00
|
|
|
void notifyEngineRemoteSetupDone(int gdbServerPort, int qmlPort);
|
|
|
|
|
void notifyEngineRemoteSetupFailed(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;
|
2011-10-12 17:26:18 +02:00
|
|
|
void resetLocation();
|
2011-02-21 17:01:40 +01:00
|
|
|
|
2012-02-15 12:35:43 +01:00
|
|
|
Internal::QtMessageLogHandler *qtMessageLogHandler() const;
|
|
|
|
|
|
2012-02-23 12:33:04 +01:00
|
|
|
void notifyInferiorIll();
|
|
|
|
|
|
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);
|
2012-04-10 09:36:15 +02:00
|
|
|
void executeDebuggerCommand(const QString &command, DebuggerLanguages languages);
|
2012-02-15 12:35:43 +01:00
|
|
|
bool evaluateScriptExpression(const QString &expression);
|
2011-01-14 14:25:02 +01:00
|
|
|
|
|
|
|
|
void setupEngine();
|
|
|
|
|
void setupInferior();
|
|
|
|
|
void runEngine();
|
|
|
|
|
void shutdownInferior();
|
|
|
|
|
void shutdownEngine();
|
2012-01-19 14:42:16 +01:00
|
|
|
void quitDebugger();
|
2012-01-18 14:58:01 +01:00
|
|
|
void abortDebugger();
|
2011-01-14 14:25:02 +01:00
|
|
|
|
|
|
|
|
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();
|
2012-04-13 17:14:10 +02:00
|
|
|
void setActiveEngine(DebuggerEngine *engine);
|
2011-01-14 17:08:59 +01:00
|
|
|
|
2010-08-18 13:54:12 +02:00
|
|
|
private:
|
2011-09-16 15:00:41 +02:00
|
|
|
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
|