2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2011-02-18 10:36:52 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
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
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2011-02-18 10:36:52 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2011-02-18 10:36:52 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2011-02-18 10:36:52 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2013-08-29 16:36:42 +02:00
|
|
|
#include <debugger/debuggerengine.h>
|
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
|
|
|
|
2014-06-05 23:03:06 +02:00
|
|
|
class QmlEngine;
|
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:
|
2015-06-24 08:26:35 +02:00
|
|
|
QmlCppEngine(const DebuggerRunParameters &sp, QStringList *errors);
|
2016-06-13 15:27:17 +02:00
|
|
|
~QmlCppEngine() override;
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2015-09-10 11:01:09 +02:00
|
|
|
bool canDisplayTooltip() const override;
|
|
|
|
|
bool canHandleToolTip(const DebuggerToolTipContext &) const override;
|
2016-06-07 17:04:53 +02:00
|
|
|
void updateItem(const QString &iname) override;
|
|
|
|
|
void expandItem(const QString &iname) override;
|
|
|
|
|
void selectWatchData(const QString &iname) override;
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2015-09-10 11:01:09 +02:00
|
|
|
void watchPoint(const QPoint &) override;
|
2016-07-14 10:00:15 +02:00
|
|
|
void fetchMemory(MemoryAgent *, quint64 addr, quint64 length) override;
|
|
|
|
|
void changeMemory(MemoryAgent *, quint64 addr, const QByteArray &data) override;
|
2015-09-10 11:01:09 +02:00
|
|
|
void fetchDisassembler(DisassemblerAgent *) override;
|
|
|
|
|
void activateFrame(int index) override;
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2015-09-10 11:01:09 +02:00
|
|
|
void reloadModules() override;
|
|
|
|
|
void examineModules() override;
|
|
|
|
|
void loadSymbols(const QString &moduleName) override;
|
|
|
|
|
void loadAllSymbols() override;
|
|
|
|
|
void requestModuleSymbols(const QString &moduleName) override;
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2015-09-10 11:01:09 +02:00
|
|
|
void reloadRegisters() override;
|
|
|
|
|
void reloadSourceFiles() override;
|
|
|
|
|
void reloadFullStack() override;
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2016-06-07 17:04:53 +02:00
|
|
|
void setRegisterValue(const QString &name, const QString &value) override;
|
2015-09-10 11:01:09 +02:00
|
|
|
bool hasCapability(unsigned cap) const override;
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2015-09-10 11:01:09 +02:00
|
|
|
bool isSynchronous() const override;
|
2016-06-07 17:04:53 +02:00
|
|
|
QString qtNamespace() const override;
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2015-09-10 11:01:09 +02:00
|
|
|
void createSnapshot() override;
|
|
|
|
|
void updateAll() override;
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2015-09-10 11:01:09 +02:00
|
|
|
void attemptBreakpointSynchronization() override;
|
|
|
|
|
bool acceptsBreakpoint(Breakpoint bp) const override;
|
|
|
|
|
void selectThread(ThreadId threadId) override;
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2015-03-19 12:42:53 +01:00
|
|
|
void assignValueInDebugger(WatchItem *item,
|
2015-09-10 11:01:09 +02:00
|
|
|
const QString &expr, const QVariant &value) override;
|
2010-08-18 13:54:12 +02:00
|
|
|
|
2015-09-10 11:01:09 +02:00
|
|
|
DebuggerEngine *cppEngine() override { return m_cppEngine; }
|
2011-09-21 16:39:45 +02:00
|
|
|
DebuggerEngine *qmlEngine() const;
|
|
|
|
|
|
2015-09-10 11:01:09 +02:00
|
|
|
void notifyEngineRemoteSetupFinished(const RemoteSetupResult &result) override;
|
|
|
|
|
void resetLocation() override;
|
|
|
|
|
void notifyInferiorIll() override;
|
2012-02-23 12:33:04 +01:00
|
|
|
|
2010-08-18 13:54:12 +02:00
|
|
|
protected:
|
2015-09-10 11:01:09 +02:00
|
|
|
void detachDebugger() override;
|
|
|
|
|
void reloadDebuggingHelpers() override;
|
|
|
|
|
void debugLastCommand() override;
|
|
|
|
|
void executeStep() override;
|
|
|
|
|
void executeStepOut() override;
|
|
|
|
|
void executeNext() override;
|
|
|
|
|
void executeStepI() override;
|
|
|
|
|
void executeNextI() override;
|
|
|
|
|
void executeReturn() override;
|
|
|
|
|
void continueInferior() override;
|
|
|
|
|
void interruptInferior() override;
|
|
|
|
|
void requestInterruptInferior() override;
|
|
|
|
|
|
|
|
|
|
void executeRunToLine(const ContextData &data) override;
|
|
|
|
|
void executeRunToFunction(const QString &functionName) override;
|
|
|
|
|
void executeJumpToLine(const ContextData &data) override;
|
|
|
|
|
void executeDebuggerCommand(const QString &command, DebuggerLanguages languages) override;
|
2017-02-21 14:50:19 +01:00
|
|
|
void doUpdateLocals(const UpdateParameters &up) override;
|
2015-09-10 11:01:09 +02:00
|
|
|
|
|
|
|
|
void setupEngine() override;
|
|
|
|
|
void setupInferior() override;
|
|
|
|
|
void runEngine() override;
|
|
|
|
|
void shutdownInferior() override;
|
|
|
|
|
void shutdownEngine() override;
|
|
|
|
|
void quitDebugger() override;
|
|
|
|
|
void abortDebugger() override;
|
|
|
|
|
|
|
|
|
|
void notifyInferiorRunOk() override;
|
|
|
|
|
void notifyInferiorSpontaneousStop() override;
|
|
|
|
|
void notifyEngineRunAndInferiorRunOk() override;
|
|
|
|
|
void notifyInferiorShutdownOk() override;
|
|
|
|
|
|
|
|
|
|
void notifyInferiorSetupOk() override;
|
2016-06-07 17:04:53 +02:00
|
|
|
void notifyEngineRemoteServerRunning(const QString &, int pid) override;
|
2016-10-11 14:58:55 +02:00
|
|
|
void loadAdditionalQmlStack() override;
|
2013-04-19 17:04:22 +02:00
|
|
|
|
2010-08-18 13:54:12 +02:00
|
|
|
private:
|
2011-01-12 15:11:12 +01:00
|
|
|
void engineStateChanged(DebuggerState newState);
|
2015-09-10 11:01:09 +02:00
|
|
|
void setState(DebuggerState newState, bool forced = false) override;
|
|
|
|
|
void slaveEngineStateChanged(DebuggerEngine *slaveEngine, DebuggerState state) override;
|
2010-08-18 13:54:12 +02:00
|
|
|
|
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:
|
2014-06-05 23:03:06 +02:00
|
|
|
QmlEngine *m_qmlEngine;
|
|
|
|
|
DebuggerEngine *m_cppEngine;
|
|
|
|
|
DebuggerEngine *m_activeEngine;
|
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
|