Commit d15cb20e authored by hjk's avatar hjk Committed by David Schulz
Browse files

Debugger: Add 'override' to *Engine classes



Thanks to clang-modernize.

Change-Id: Ie1998c32d492cb458b9b4649c425c0de272ce976
Reviewed-by: default avatarDavid Schulz <david.schulz@theqtcompany.com>
parent 0095953e
......@@ -188,12 +188,12 @@ public:
: m_engine(engine)
{}
bool canHandle(const Task &task) const
bool canHandle(const Task &task) const override
{
return m_debugInfoTasks.contains(task.taskId);
}
void handle(const Task &task)
void handle(const Task &task) override
{
m_engine->requestDebugInformation(m_debugInfoTasks.value(task.taskId));
}
......@@ -203,7 +203,7 @@ public:
m_debugInfoTasks[id] = task;
}
QAction *createAction(QObject *parent) const
QAction *createAction(QObject *parent) const override
{
QAction *action = new QAction(DebuggerPlugin::tr("Install &Debug Information"), parent);
action->setToolTip(DebuggerPlugin::tr("Tries to install missing debug information."));
......
......@@ -73,22 +73,22 @@ public:
~GdbEngine();
private: ////////// General Interface //////////
virtual DebuggerEngine *cppEngine() { return this; }
DebuggerEngine *cppEngine() override { return this; }
virtual void setupEngine() = 0;
virtual void handleGdbStartFailed();
virtual void setupInferior() = 0;
virtual void notifyInferiorSetupFailed();
virtual void notifyInferiorSetupFailed() override;
virtual bool hasCapability(unsigned) const;
virtual void detachDebugger();
virtual void shutdownInferior();
virtual bool hasCapability(unsigned) const override;
virtual void detachDebugger() override;
virtual void shutdownInferior() override;
virtual void shutdownEngine() = 0;
virtual void abortDebugger();
virtual void resetInferior();
virtual void abortDebugger() override;
virtual void resetInferior() override;
virtual bool acceptsDebuggerCommands() const;
virtual void executeDebuggerCommand(const QString &command, DebuggerLanguages languages);
virtual bool acceptsDebuggerCommands() const override;
virtual void executeDebuggerCommand(const QString &command, DebuggerLanguages languages) override;
private: ////////// General State //////////
......@@ -224,7 +224,7 @@ protected:
StackFrame parseStackFrame(const GdbMi &mi, int level);
void resetCommandQueue();
bool isSynchronous() const { return true; }
bool isSynchronous() const override { return true; }
// Gdb initialization sequence
void handleShowVersion(const DebuggerResponse &response);
......@@ -237,29 +237,29 @@ protected:
private: ////////// Inferior Management //////////
// This should be always the last call in a function.
bool stateAcceptsBreakpointChanges() const;
bool acceptsBreakpoint(Breakpoint bp) const;
void insertBreakpoint(Breakpoint bp);
void removeBreakpoint(Breakpoint bp);
void changeBreakpoint(Breakpoint bp);
void executeStep();
void executeStepOut();
void executeNext();
void executeStepI();
void executeNextI();
bool stateAcceptsBreakpointChanges() const override;
bool acceptsBreakpoint(Breakpoint bp) const override;
void insertBreakpoint(Breakpoint bp) override;
void removeBreakpoint(Breakpoint bp) override;
void changeBreakpoint(Breakpoint bp) override;
void executeStep() override;
void executeStepOut() override;
void executeNext() override;
void executeStepI() override;
void executeNextI() override;
protected:
void continueInferiorInternal();
void autoContinueInferior();
void continueInferior();
void interruptInferior();
void continueInferior() override;
void interruptInferior() override;
virtual void interruptInferior2() {}
void executeRunToLine(const ContextData &data);
void executeRunToFunction(const QString &functionName);
void executeJumpToLine(const ContextData &data);
void executeReturn();
void executeRunToLine(const ContextData &data) override;
void executeRunToFunction(const QString &functionName) override;
void executeJumpToLine(const ContextData &data) override;
void executeReturn() override;
void handleExecuteContinue(const DebuggerResponse &response);
void handleExecuteStep(const DebuggerResponse &response);
......@@ -274,8 +274,8 @@ private: ////////// Inferior Management //////////
private: ////////// View & Data Stuff //////////
void selectThread(ThreadId threadId);
void activateFrame(int index);
void selectThread(ThreadId threadId) override;
void activateFrame(int index) override;
//
// Breakpoint specific stuff
......@@ -301,13 +301,13 @@ private: ////////// View & Data Stuff //////////
// Modules specific stuff
//
protected:
void loadSymbols(const QString &moduleName);
Q_SLOT void loadAllSymbols();
void loadSymbolsForStack();
void requestModuleSymbols(const QString &moduleName);
void requestModuleSections(const QString &moduleName);
void reloadModules();
void examineModules();
void loadSymbols(const QString &moduleName) override;
Q_SLOT void loadAllSymbols() override;
void loadSymbolsForStack() override;
void requestModuleSymbols(const QString &moduleName) override;
void requestModuleSections(const QString &moduleName) override;
void reloadModules() override;
void examineModules() override;
void reloadModulesInternal();
void handleModulesList(const DebuggerResponse &response);
......@@ -316,14 +316,14 @@ private: ////////// View & Data Stuff //////////
//
// Snapshot specific stuff
//
virtual void createSnapshot();
virtual void createSnapshot() override;
void handleMakeSnapshot(const DebuggerResponse &response, const QString &coreFile);
//
// Register specific stuff
//
Q_SLOT void reloadRegisters();
void setRegisterValue(const QByteArray &name, const QString &value);
Q_SLOT void reloadRegisters() override;
void setRegisterValue(const QByteArray &name, const QString &value) override;
void handleRegisterListNames(const DebuggerResponse &response);
void handleRegisterListing(const DebuggerResponse &response);
void handleRegisterListValues(const DebuggerResponse &response);
......@@ -334,7 +334,7 @@ private: ////////// View & Data Stuff //////////
// Disassembler specific stuff
//
// Chain of fallbacks: PointMixed -> PointPlain -> RangeMixed -> RangePlain.
void fetchDisassembler(DisassemblerAgent *agent);
void fetchDisassembler(DisassemblerAgent *agent) override;
void fetchDisassemblerByCliPointMixed(const DisassemblerAgentCookie &ac);
void fetchDisassemblerByCliRangeMixed(const DisassemblerAgentCookie &ac);
void fetchDisassemblerByCliRangePlain(const DisassemblerAgentCookie &ac);
......@@ -345,7 +345,7 @@ private: ////////// View & Data Stuff //////////
//
// Source file specific stuff
//
void reloadSourceFiles();
void reloadSourceFiles() override;
void reloadSourceFilesInternal();
void handleQuerySources(const DebuggerResponse &response);
......@@ -363,7 +363,7 @@ private: ////////// View & Data Stuff //////////
// Stack specific stuff
//
protected:
void updateAll();
void updateAll() override;
void handleStackListFrames(const DebuggerResponse &response, bool isFull);
void handleStackSelectThread(const DebuggerResponse &response);
void handleThreadListIds(const DebuggerResponse &response);
......@@ -371,8 +371,8 @@ protected:
void handleThreadNames(const DebuggerResponse &response);
DebuggerCommand stackCommand(int depth);
Q_SLOT void reloadStack();
Q_SLOT virtual void reloadFullStack();
virtual void loadAdditionalQmlStack();
Q_SLOT virtual void reloadFullStack() override;
virtual void loadAdditionalQmlStack() override;
void handleQmlStackFrameArguments(const DebuggerResponse &response);
void handleQmlStackTrace(const DebuggerResponse &response);
int currentFrame() const;
......@@ -383,17 +383,17 @@ protected:
// Watch specific stuff
//
virtual void assignValueInDebugger(WatchItem *item,
const QString &expr, const QVariant &value);
const QString &expr, const QVariant &value) override;
virtual void fetchMemory(MemoryAgent *agent, QObject *token,
quint64 addr, quint64 length);
quint64 addr, quint64 length) override;
void fetchMemoryHelper(const MemoryAgentCookie &cookie);
void handleChangeMemory(const DebuggerResponse &response);
virtual void changeMemory(MemoryAgent *agent, QObject *token,
quint64 addr, const QByteArray &data);
quint64 addr, const QByteArray &data) override;
void handleFetchMemory(const DebuggerResponse &response, MemoryAgentCookie ac);
virtual void watchPoint(const QPoint &);
virtual void watchPoint(const QPoint &) override;
void handleWatchPoint(const DebuggerResponse &response);
void showToolTip();
......@@ -406,7 +406,7 @@ protected:
Q_SLOT void createFullBacktrace();
void handleCreateFullBacktrace(const DebuggerResponse &response);
void doUpdateLocals(const UpdateParameters &parameters);
void doUpdateLocals(const UpdateParameters &parameters) override;
void handleStackFrame(const DebuggerResponse &response);
void setLocals(const QList<GdbMi> &locals);
......@@ -414,7 +414,7 @@ protected:
//
// Dumper Management
//
void reloadDebuggingHelpers();
void reloadDebuggingHelpers() override;
QString m_gdb;
......@@ -467,7 +467,7 @@ protected:
static QString msgConnectRemoteServerFailed(const QString &why);
static QByteArray dotEscape(QByteArray str);
void debugLastCommand();
void debugLastCommand() override;
DebuggerCommand m_lastDebuggableCommand;
protected:
......
......@@ -71,64 +71,64 @@ signals:
void outputReady(const QByteArray &data);
private:
DebuggerEngine *cppEngine() { return this; }
DebuggerEngine *cppEngine() override { return this; }
void executeStep();
void executeStepOut();
void executeNext();
void executeStepI();
void executeNextI();
void executeStep() override;
void executeStepOut() override;
void executeNext() override;
void executeStepI() override;
void executeNextI() override;
void setupEngine();
void setupEngine() override;
void startLldb();
void startLldbStage2();
void setupInferior();
void runEngine();
void shutdownInferior();
void shutdownEngine();
void abortDebugger();
void setupInferior() override;
void runEngine() override;
void shutdownInferior() override;
void shutdownEngine() override;
void abortDebugger() override;
bool canHandleToolTip(const DebuggerToolTipContext &) const;
bool canHandleToolTip(const DebuggerToolTipContext &) const override;
void continueInferior();
void interruptInferior();
void continueInferior() override;
void interruptInferior() override;
void executeRunToLine(const ContextData &data);
void executeRunToFunction(const QString &functionName);
void executeJumpToLine(const ContextData &data);
void executeRunToLine(const ContextData &data) override;
void executeRunToFunction(const QString &functionName) override;
void executeJumpToLine(const ContextData &data) override;
void activateFrame(int index);
void selectThread(ThreadId threadId);
void activateFrame(int index) override;
void selectThread(ThreadId threadId) override;
void fetchFullBacktrace();
// This should be always the last call in a function.
bool stateAcceptsBreakpointChanges() const;
bool acceptsBreakpoint(Breakpoint bp) const;
void insertBreakpoint(Breakpoint bp);
void removeBreakpoint(Breakpoint bp);
void changeBreakpoint(Breakpoint bp);
void assignValueInDebugger(WatchItem *item, const QString &expr, const QVariant &value);
void executeDebuggerCommand(const QString &command, DebuggerLanguages languages);
void loadSymbols(const QString &moduleName);
void loadAllSymbols();
void requestModuleSymbols(const QString &moduleName);
void reloadModules();
void reloadRegisters();
void reloadSourceFiles() {}
void reloadFullStack();
void reloadDebuggingHelpers();
void fetchDisassembler(Internal::DisassemblerAgent *);
bool isSynchronous() const { return true; }
void setRegisterValue(const QByteArray &name, const QString &value);
void fetchMemory(Internal::MemoryAgent *, QObject *, quint64 addr, quint64 length);
void changeMemory(Internal::MemoryAgent *, QObject *, quint64 addr, const QByteArray &data);
bool stateAcceptsBreakpointChanges() const override;
bool acceptsBreakpoint(Breakpoint bp) const override;
void insertBreakpoint(Breakpoint bp) override;
void removeBreakpoint(Breakpoint bp) override;
void changeBreakpoint(Breakpoint bp) override;
void assignValueInDebugger(WatchItem *item, const QString &expr, const QVariant &value) override;
void executeDebuggerCommand(const QString &command, DebuggerLanguages languages) override;
void loadSymbols(const QString &moduleName) override;
void loadAllSymbols() override;
void requestModuleSymbols(const QString &moduleName) override;
void reloadModules() override;
void reloadRegisters() override;
void reloadSourceFiles() override {}
void reloadFullStack() override;
void reloadDebuggingHelpers() override;
void fetchDisassembler(Internal::DisassemblerAgent *) override;
bool isSynchronous() const override { return true; }
void setRegisterValue(const QByteArray &name, const QString &value) override;
void fetchMemory(Internal::MemoryAgent *, QObject *, quint64 addr, quint64 length) override;
void changeMemory(Internal::MemoryAgent *, QObject *, quint64 addr, const QByteArray &data) override;
QString errorMessage(QProcess::ProcessError error) const;
bool hasCapability(unsigned cap) const;
bool hasCapability(unsigned cap) const override;
void handleLldbFinished(int exitCode, QProcess::ExitStatus exitStatus);
void handleLldbError(QProcess::ProcessError error);
......@@ -140,15 +140,15 @@ private:
void handleOutputNotification(const GdbMi &output);
void handleResponse(const QByteArray &data);
void updateAll();
void doUpdateLocals(const UpdateParameters &params);
void updateAll() override;
void doUpdateLocals(const UpdateParameters &params) override;
void updateBreakpointData(Breakpoint bp, const GdbMi &bkpt, bool added);
void fetchStack(int limit);
void notifyEngineRemoteSetupFinished(const RemoteSetupResult &result);
void notifyEngineRemoteSetupFinished(const RemoteSetupResult &result) override;
void runCommand(const DebuggerCommand &cmd);
void debugLastCommand();
void debugLastCommand() override;
private:
DebuggerCommand m_lastDebuggableCommand;
......
......@@ -54,49 +54,49 @@ public:
private:
// DebuggerEngine implementation
void executeStep();
void executeStepOut();
void executeNext();
void executeStepI();
void executeNextI();
void executeStep() override;
void executeStepOut() override;
void executeNext() override;
void executeStepI() override;
void executeNextI() override;
void setupEngine();
void setupInferior();
void runEngine();
void shutdownInferior();
void shutdownEngine();
void setupEngine() override;
void setupInferior() override;
void runEngine() override;
void shutdownInferior() override;
void shutdownEngine() override;
bool canHandleToolTip(const DebuggerToolTipContext &) const;
bool canHandleToolTip(const DebuggerToolTipContext &) const override;
void continueInferior();
void interruptInferior();
void continueInferior() override;
void interruptInferior() override;
void executeRunToLine(const ContextData &data);
void executeRunToFunction(const QString &functionName);
void executeJumpToLine(const ContextData &data);
void executeRunToLine(const ContextData &data) override;
void executeRunToFunction(const QString &functionName) override;
void executeJumpToLine(const ContextData &data) override;
void activateFrame(int index);
void selectThread(ThreadId threadId);
void activateFrame(int index) override;
void selectThread(ThreadId threadId) override;
bool acceptsBreakpoint(Breakpoint bp) const;
void insertBreakpoint(Breakpoint bp);
void removeBreakpoint(Breakpoint bp);
bool acceptsBreakpoint(Breakpoint bp) const override;
void insertBreakpoint(Breakpoint bp) override;
void removeBreakpoint(Breakpoint bp) override;
void assignValueInDebugger(WatchItem *item,
const QString &expr, const QVariant &value);
void executeDebuggerCommand(const QString &command, DebuggerLanguages languages);
const QString &expr, const QVariant &value) override;
void executeDebuggerCommand(const QString &command, DebuggerLanguages languages) override;
void loadSymbols(const QString &moduleName);
void loadAllSymbols();
void requestModuleSymbols(const QString &moduleName);
void reloadModules();
void reloadRegisters() {}
void reloadSourceFiles() {}
void reloadFullStack() {}
void loadSymbols(const QString &moduleName) override;
void loadAllSymbols() override;
void requestModuleSymbols(const QString &moduleName) override;
void reloadModules() override;
void reloadRegisters() override {}
void reloadSourceFiles() override {}
void reloadFullStack() override {}
bool supportsThreads() const { return true; }
bool isSynchronous() const { return true; }
void updateItem(const QByteArray &iname);
bool isSynchronous() const override { return true; }
void updateItem(const QByteArray &iname) override;
void runCommand(const DebuggerCommand &cmd);
void postDirectCommand(const QByteArray &command);
......@@ -109,7 +109,7 @@ private:
void refreshSymbols(const GdbMi &symbols);
QString errorMessage(QProcess::ProcessError error) const;
bool hasCapability(unsigned cap) const;
bool hasCapability(unsigned cap) const override;
void handlePdbFinished(int, QProcess::ExitStatus status);
void handlePdbError(QProcess::ProcessError error);
......@@ -118,8 +118,8 @@ private:
void handleOutput2(const QByteArray &data);
void handleResponse(const QByteArray &ba);
void handleOutput(const QByteArray &data);
void updateAll();
void updateLocals();
void updateAll() override;
void updateLocals() override;
QByteArray m_inbuffer;
QProcess m_proc;
......
......@@ -46,93 +46,93 @@ public:
QmlCppEngine(const DebuggerRunParameters &sp, QStringList *errors);
~QmlCppEngine();
bool canDisplayTooltip() const;
bool canHandleToolTip(const DebuggerToolTipContext &) const;
void updateItem(const QByteArray &iname);
void expandItem(const QByteArray &iname);
void selectWatchData(const QByteArray &iname);
bool canDisplayTooltip() const override;
bool canHandleToolTip(const DebuggerToolTipContext &) const override;
void updateItem(const QByteArray &iname) override;
void expandItem(const QByteArray &iname) override;
void selectWatchData(const QByteArray &iname) override;
void watchPoint(const QPoint &);
void fetchMemory(MemoryAgent *, QObject *, quint64 addr, quint64 length);
void fetchDisassembler(DisassemblerAgent *);
void activateFrame(int index);
void watchPoint(const QPoint &) override;
void fetchMemory(MemoryAgent *, QObject *, quint64 addr, quint64 length) override;
void fetchDisassembler(DisassemblerAgent *) override;
void activateFrame(int index) override;
void reloadModules();
void examineModules();
void loadSymbols(const QString &moduleName);
void loadAllSymbols();
void requestModuleSymbols(const QString &moduleName);
void reloadModules() override;
void examineModules() override;
void loadSymbols(const QString &moduleName) override;
void loadAllSymbols() override;
void requestModuleSymbols(const QString &moduleName) override;
void reloadRegisters();
void reloadSourceFiles();
void reloadFullStack();
void reloadRegisters() override;
void reloadSourceFiles() override;
void reloadFullStack() override;
void setRegisterValue(const QByteArray &name, const QString &value);
bool hasCapability(unsigned cap) const;
void setRegisterValue(const QByteArray &name, const QString &value) override;
bool hasCapability(unsigned cap) const override;
bool isSynchronous() const;
QByteArray qtNamespace() const;
bool isSynchronous() const override;
QByteArray qtNamespace() const override;
void createSnapshot();
void updateAll();
void createSnapshot() override;
void updateAll() override;
void attemptBreakpointSynchronization();
bool acceptsBreakpoint(Breakpoint bp) const;
void selectThread(ThreadId threadId);
void attemptBreakpointSynchronization() override;
bool acceptsBreakpoint(Breakpoint bp) const override;
void selectThread(ThreadId threadId) override;
void assignValueInDebugger(WatchItem *item,
const QString &expr, const QVariant &value);
const QString &expr, const QVariant &value) override;
DebuggerEngine *cppEngine() { return m_cppEngine; }
DebuggerEngine *cppEngine() override { return m_cppEngine; }
DebuggerEngine *qmlEngine() const;
void notifyEngineRemoteSetupFinished(const RemoteSetupResult &result);
void notifyEngineRemoteSetupFinished(const RemoteSetupResult &result) override;
void showMessage(const QString &msg, int channel = LogDebug,
int timeout = -1) const;
void resetLocation();
int timeout = -1) const override;
void resetLocation() override;
void notifyInferiorIll();
void notifyInferiorIll() override;
protected:
void detachDebugger();
void reloadDebuggingHelpers();
void debugLastCommand();
void executeStep();
void executeStepOut();
void executeNext();
void executeStepI();
void executeNextI();
void executeReturn();
void continueInferior();
void interruptInferior();
void requestInterruptInferior();
void executeRunToLine(const ContextData &data);
void executeRunToFunction(const QString &functionName);
void executeJumpToLine(const ContextData &data);
void executeDebuggerCommand(const QString &command, DebuggerLanguages languages);
void setupEngine();
void setupInferior();
void runEngine();
void shutdownInferior();
void shutdownEngine();
void quitDebugger();
void abortDebugger();
void notifyInferiorRunOk();
void notifyInferiorSpontaneousStop();
void notifyEngineRunAndInferiorRunOk();
void notifyInferiorShutdownOk();
void notifyInferiorSetupOk();