1 /**************************************************************************
3 ** This file is part of Qt Creator
5 ** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
7 ** Contact: Nokia Corporation (qt-info@nokia.com)
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
16 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
25 ** In addition, as a special exception, Nokia gives you certain additional
26 ** rights. These rights are described in the Nokia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
29 ** If you have questions regarding the use of this file, please contact
30 ** Nokia at qt-info@nokia.com.
32 **************************************************************************/
34 #ifndef QMLGDBENGINE_H
35 #define QMLGDBENGINE_H
37 #include "debuggerengine.h"
39 #include <QtCore/QScopedPointer>
44 class QmlCppEnginePrivate;
46 class DEBUGGER_EXPORT QmlCppEngine : public DebuggerEngine
51 explicit QmlCppEngine(const DebuggerStartParameters &sp,
52 DebuggerEngineType slaveEngineType,
53 QString *errorMessage);
56 bool setToolTipExpression(const QPoint &mousePos,
57 TextEditor::ITextEditor * editor, const DebuggerToolTipContext &);
58 void updateWatchData(const WatchData &data,
59 const WatchUpdateFlags &flags);
61 void watchPoint(const QPoint &);
62 void fetchMemory(MemoryAgent *, QObject *, quint64 addr, quint64 length);
63 void fetchDisassembler(DisassemblerAgent *);
64 void activateFrame(int index);
67 void examineModules();
68 void loadSymbols(const QString &moduleName);
69 void loadAllSymbols();
70 void requestModuleSymbols(const QString &moduleName);
72 void reloadRegisters();
73 void reloadSourceFiles();
74 void reloadFullStack();
76 void setRegisterValue(int regnr, const QString &value);
77 unsigned debuggerCapabilities() const;
78 virtual bool canWatchWidgets() const;
79 virtual bool acceptsWatchesWhileRunning() const;
81 bool isSynchronous() const;
82 QByteArray qtNamespace() const;
84 void createSnapshot();
87 void attemptBreakpointSynchronization();
88 bool acceptsBreakpoint(BreakpointId id) const;
89 void selectThread(int index);
91 void assignValueInDebugger(const WatchData *data,
92 const QString &expr, const QVariant &value);
94 DebuggerEngine *cppEngine() const;
95 void handleRemoteSetupDone(int gdbServerPort, int qmlPort);
96 void handleRemoteSetupFailed(const QString &message);
98 void showMessage(const QString &msg, int channel = LogDebug,
99 int timeout = -1) const;
102 void detachDebugger();
104 void executeStepOut();
108 void executeReturn();
109 void continueInferior();
110 void interruptInferior();
111 void requestInterruptInferior();
113 void executeRunToLine(const ContextData &data);
114 void executeRunToFunction(const QString &functionName);
115 void executeJumpToLine(const ContextData &data);
116 void executeDebuggerCommand(const QString &command);
119 void setupInferior();
121 void shutdownInferior();
122 void shutdownEngine();
124 void notifyInferiorRunOk();
125 void notifyInferiorSpontaneousStop();
126 void notifyEngineRunAndInferiorRunOk();
127 void notifyInferiorShutdownOk();
130 void engineStateChanged(DebuggerState newState);
131 void setState(DebuggerState newState, bool forced = false);
132 void slaveEngineStateChanged(DebuggerEngine *slaveEngine, DebuggerState state);
134 void readyToExecuteQmlStep();
137 QScopedPointer<QmlCppEnginePrivate> d;
140 } // namespace Internal
141 } // namespace Debugger
143 #endif // QMLGDBENGINE_H