From 44b43a52dc17135e43824e826862c8b35081cac0 Mon Sep 17 00:00:00 2001 From: Logan Smith Date: Wed, 15 Jul 2020 11:33:15 -0700 Subject: [PATCH] [lldb][NFC] Add 'override' where missing in source/ and tools/ These were found by Clang's new -Wsuggest-override. This patch doesn't touch any code in unittests/, since much of it intentionally doesn't use override to avoid massive warning spam from -Winconsistent-missing-override due to the use of MOCK_*** macros. Differential Revision: https://reviews.llvm.org/D83847 --- .../Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp | 4 +- .../Process/MacOSX-Kernel/RegisterContextKDP_arm.h | 16 ++--- .../MacOSX-Kernel/RegisterContextKDP_arm64.h | 16 ++--- .../MacOSX-Kernel/RegisterContextKDP_i386.h | 12 ++-- .../MacOSX-Kernel/RegisterContextKDP_x86_64.h | 12 ++-- .../Plugins/Process/MacOSX-Kernel/ThreadKDP.h | 16 ++--- .../Process/Utility/RegisterContextMach_arm.h | 16 ++--- .../Process/Utility/RegisterContextMach_i386.h | 12 ++-- .../Process/Utility/RegisterContextMach_x86_64.h | 12 ++-- .../SymbolVendor/MacOSX/SymbolVendorMacOSX.h | 4 +- lldb/source/Symbol/FuncUnwinders.cpp | 4 +- .../source/MacOSX/i386/DNBArchImplI386.h | 70 ++++++++++----------- .../source/MacOSX/x86_64/DNBArchImplX86_64.h | 72 +++++++++++----------- 13 files changed, 133 insertions(+), 133 deletions(-) diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp index 2f4a891..dde2518 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp @@ -873,7 +873,7 @@ private: OptionGroupUInt64 m_command_byte; OptionGroupString m_packet_data; - virtual Options *GetOptions() { return &m_option_group; } + Options *GetOptions() override { return &m_option_group; } public: CommandObjectProcessKDPPacketSend(CommandInterpreter &interpreter) @@ -900,7 +900,7 @@ public: ~CommandObjectProcessKDPPacketSend() {} - bool DoExecute(Args &command, CommandReturnObject &result) { + bool DoExecute(Args &command, CommandReturnObject &result) override { const size_t argc = command.GetArgumentCount(); if (argc == 0) { if (!m_command_byte.GetOptionValue().OptionWasSet()) { diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm.h b/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm.h index 616aff8..35ae0d0 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm.h +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm.h @@ -20,21 +20,21 @@ public: virtual ~RegisterContextKDP_arm(); protected: - virtual int DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr); + int DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) override; - int DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu); + int DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu) override; - int DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc); + int DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc) override; - int DoReadDBG(lldb::tid_t tid, int flavor, DBG &dbg); + int DoReadDBG(lldb::tid_t tid, int flavor, DBG &dbg) override; - int DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr); + int DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr) override; - int DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu); + int DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu) override; - int DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc); + int DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc) override; - int DoWriteDBG(lldb::tid_t tid, int flavor, const DBG &dbg); + int DoWriteDBG(lldb::tid_t tid, int flavor, const DBG &dbg) override; ThreadKDP &m_kdp_thread; }; diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm64.h b/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm64.h index 998a78a..be387d6 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm64.h +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_arm64.h @@ -21,21 +21,21 @@ public: virtual ~RegisterContextKDP_arm64(); protected: - virtual int DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr); + int DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) override; - int DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu); + int DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu) override; - int DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc); + int DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc) override; - int DoReadDBG(lldb::tid_t tid, int flavor, DBG &dbg); + int DoReadDBG(lldb::tid_t tid, int flavor, DBG &dbg) override; - int DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr); + int DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr) override; - int DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu); + int DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu) override; - int DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc); + int DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc) override; - int DoWriteDBG(lldb::tid_t tid, int flavor, const DBG &dbg); + int DoWriteDBG(lldb::tid_t tid, int flavor, const DBG &dbg) override; ThreadKDP &m_kdp_thread; }; diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.h b/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.h index f32c88e..9ee6af7 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.h +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_i386.h @@ -20,17 +20,17 @@ public: virtual ~RegisterContextKDP_i386(); protected: - virtual int DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr); + int DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) override; - int DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu); + int DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu) override; - int DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc); + int DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc) override; - int DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr); + int DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr) override; - int DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu); + int DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu) override; - int DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc); + int DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc) override; ThreadKDP &m_kdp_thread; }; diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_x86_64.h b/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_x86_64.h index c4aad97..3d5139d 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_x86_64.h +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/RegisterContextKDP_x86_64.h @@ -20,17 +20,17 @@ public: virtual ~RegisterContextKDP_x86_64(); protected: - virtual int DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr); + int DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) override; - int DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu); + int DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu) override; - int DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc); + int DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc) override; - int DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr); + int DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr) override; - int DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu); + int DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu) override; - int DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc); + int DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc) override; ThreadKDP &m_kdp_thread; }; diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.h b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.h index c75540a..7f13fcb 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.h +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ThreadKDP.h @@ -22,16 +22,16 @@ public: virtual ~ThreadKDP(); - virtual void RefreshStateAfterStop(); + void RefreshStateAfterStop() override; - virtual const char *GetName(); + const char *GetName() override; - virtual const char *GetQueueName(); + const char *GetQueueName() override; - virtual lldb::RegisterContextSP GetRegisterContext(); + lldb::RegisterContextSP GetRegisterContext() override; - virtual lldb::RegisterContextSP - CreateRegisterContextForFrame(lldb_private::StackFrame *frame); + lldb::RegisterContextSP + CreateRegisterContextForFrame(lldb_private::StackFrame *frame) override; void Dump(lldb_private::Log *log, uint32_t index); @@ -41,7 +41,7 @@ public: const char *GetBasicInfoAsString(); - void SetName(const char *name) { + void SetName(const char *name) override { if (name && name[0]) m_thread_name.assign(name); else @@ -66,7 +66,7 @@ protected: lldb::addr_t m_thread_dispatch_qaddr; lldb::StopInfoSP m_cached_stop_info_sp; // Protected member functions. - virtual bool CalculateStopInfo(); + bool CalculateStopInfo() override; }; #endif // LLDB_SOURCE_PLUGINS_PROCESS_MACOSX_KERNEL_THREADKDP_H diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextMach_arm.h b/lldb/source/Plugins/Process/Utility/RegisterContextMach_arm.h index e7c180d..1ceca65 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextMach_arm.h +++ b/lldb/source/Plugins/Process/Utility/RegisterContextMach_arm.h @@ -19,21 +19,21 @@ public: virtual ~RegisterContextMach_arm(); protected: - virtual int DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr); + int DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) override; - int DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu); + int DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu) override; - int DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc); + int DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc) override; - int DoReadDBG(lldb::tid_t tid, int flavor, DBG &dbg); + int DoReadDBG(lldb::tid_t tid, int flavor, DBG &dbg) override; - int DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr); + int DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr) override; - int DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu); + int DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu) override; - int DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc); + int DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc) override; - int DoWriteDBG(lldb::tid_t tid, int flavor, const DBG &dbg); + int DoWriteDBG(lldb::tid_t tid, int flavor, const DBG &dbg) override; }; #endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTMACH_ARM_H diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextMach_i386.h b/lldb/source/Plugins/Process/Utility/RegisterContextMach_i386.h index 09966be..da5411e 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextMach_i386.h +++ b/lldb/source/Plugins/Process/Utility/RegisterContextMach_i386.h @@ -19,17 +19,17 @@ public: virtual ~RegisterContextMach_i386(); protected: - virtual int DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr); + int DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) override; - int DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu); + int DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu) override; - int DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc); + int DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc) override; - int DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr); + int DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr) override; - int DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu); + int DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu) override; - int DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc); + int DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc) override; }; #endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTMACH_I386_H diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextMach_x86_64.h b/lldb/source/Plugins/Process/Utility/RegisterContextMach_x86_64.h index 2a8a2cca..c131c82 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextMach_x86_64.h +++ b/lldb/source/Plugins/Process/Utility/RegisterContextMach_x86_64.h @@ -20,17 +20,17 @@ public: virtual ~RegisterContextMach_x86_64(); protected: - virtual int DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr); + int DoReadGPR(lldb::tid_t tid, int flavor, GPR &gpr) override; - int DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu); + int DoReadFPU(lldb::tid_t tid, int flavor, FPU &fpu) override; - int DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc); + int DoReadEXC(lldb::tid_t tid, int flavor, EXC &exc) override; - int DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr); + int DoWriteGPR(lldb::tid_t tid, int flavor, const GPR &gpr) override; - int DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu); + int DoWriteFPU(lldb::tid_t tid, int flavor, const FPU &fpu) override; - int DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc); + int DoWriteEXC(lldb::tid_t tid, int flavor, const EXC &exc) override; }; #endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_REGISTERCONTEXTMACH_X86_64_H diff --git a/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.h b/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.h index 7d2de4a..b15ea74 100644 --- a/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.h +++ b/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.h @@ -33,9 +33,9 @@ public: virtual ~SymbolVendorMacOSX(); // PluginInterface protocol - virtual lldb_private::ConstString GetPluginName(); + lldb_private::ConstString GetPluginName() override; - virtual uint32_t GetPluginVersion(); + uint32_t GetPluginVersion() override; private: SymbolVendorMacOSX(const SymbolVendorMacOSX &) = delete; diff --git a/lldb/source/Symbol/FuncUnwinders.cpp b/lldb/source/Symbol/FuncUnwinders.cpp index 3026612..9a2671a 100644 --- a/lldb/source/Symbol/FuncUnwinders.cpp +++ b/lldb/source/Symbol/FuncUnwinders.cpp @@ -183,11 +183,11 @@ class RegisterContextToInfo: public SymbolFile::RegisterInfoResolver { public: RegisterContextToInfo(RegisterContext &ctx) : m_ctx(ctx) {} - const RegisterInfo *ResolveName(llvm::StringRef name) const { + const RegisterInfo *ResolveName(llvm::StringRef name) const override { return m_ctx.GetRegisterInfoByName(name); } const RegisterInfo *ResolveNumber(lldb::RegisterKind kind, - uint32_t number) const { + uint32_t number) const override { return m_ctx.GetRegisterInfo(kind, number); } diff --git a/lldb/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h b/lldb/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h index 43594e8..a702ea5 100644 --- a/lldb/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h +++ b/lldb/tools/debugserver/source/MacOSX/i386/DNBArchImplI386.h @@ -31,38 +31,38 @@ public: static void Initialize(); - virtual bool GetRegisterValue(uint32_t set, uint32_t reg, - DNBRegisterValue *value); - virtual bool SetRegisterValue(uint32_t set, uint32_t reg, - const DNBRegisterValue *value); - virtual nub_size_t GetRegisterContext(void *buf, nub_size_t buf_len); - virtual nub_size_t SetRegisterContext(const void *buf, nub_size_t buf_len); - virtual uint32_t SaveRegisterState(); - virtual bool RestoreRegisterState(uint32_t save_id); - - virtual kern_return_t GetRegisterState(int set, bool force); - virtual kern_return_t SetRegisterState(int set); - virtual bool RegisterSetStateIsValid(int set) const; - - virtual uint64_t GetPC(uint64_t failValue); // Get program counter - virtual kern_return_t SetPC(uint64_t value); - virtual uint64_t GetSP(uint64_t failValue); // Get stack pointer - virtual void ThreadWillResume(); - virtual bool ThreadDidStop(); - virtual bool NotifyException(MachException::Data &exc); - - virtual uint32_t NumSupportedHardwareBreakpoints(); - virtual uint32_t NumSupportedHardwareWatchpoints(); - virtual uint32_t EnableHardwareBreakpoint(nub_addr_t addr, nub_size_t size, - bool also_set_on_task); - virtual bool DisableHardwareBreakpoint(uint32_t hw_index, - bool also_set_on_task); - virtual uint32_t EnableHardwareWatchpoint(nub_addr_t addr, nub_size_t size, - bool read, bool write, - bool also_set_on_task); - virtual bool DisableHardwareWatchpoint(uint32_t hw_break_index, - bool also_set_on_task); - virtual uint32_t GetHardwareWatchpointHit(nub_addr_t &addr); + bool GetRegisterValue(uint32_t set, uint32_t reg, + DNBRegisterValue *value) override; + bool SetRegisterValue(uint32_t set, uint32_t reg, + const DNBRegisterValue *value) override; + nub_size_t GetRegisterContext(void *buf, nub_size_t buf_len) override; + nub_size_t SetRegisterContext(const void *buf, nub_size_t buf_len) override; + uint32_t SaveRegisterState() override; + bool RestoreRegisterState(uint32_t save_id) override; + + kern_return_t GetRegisterState(int set, bool force) override; + kern_return_t SetRegisterState(int set) override; + bool RegisterSetStateIsValid(int set) const override; + + uint64_t GetPC(uint64_t failValue) override; // Get program counter + kern_return_t SetPC(uint64_t value) override; + uint64_t GetSP(uint64_t failValue) override; // Get stack pointer + void ThreadWillResume() override; + bool ThreadDidStop() override; + bool NotifyException(MachException::Data &exc) override; + + uint32_t NumSupportedHardwareBreakpoints() override; + uint32_t NumSupportedHardwareWatchpoints() override; + uint32_t EnableHardwareBreakpoint(nub_addr_t addr, nub_size_t size, + bool also_set_on_task) override; + bool DisableHardwareBreakpoint(uint32_t hw_index, + bool also_set_on_task) override; + uint32_t EnableHardwareWatchpoint(nub_addr_t addr, nub_size_t size, + bool read, bool write, + bool also_set_on_task) override; + bool DisableHardwareWatchpoint(uint32_t hw_break_index, + bool also_set_on_task) override; + uint32_t GetHardwareWatchpointHit(nub_addr_t &addr) override; protected: kern_return_t EnableHardwareSingleStep(bool enable); @@ -228,9 +228,9 @@ protected: static bool IsWatchpointHit(const DBG &debug_state, uint32_t hw_index); static nub_addr_t GetWatchAddress(const DBG &debug_state, uint32_t hw_index); - virtual bool StartTransForHWP(); - virtual bool RollbackTransForHWP(); - virtual bool FinishTransForHWP(); + bool StartTransForHWP() override; + bool RollbackTransForHWP() override; + bool FinishTransForHWP() override; DBG GetDBGCheckpoint(); MachThread *m_thread; diff --git a/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h b/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h index 0ed433f..96da02a 100644 --- a/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h +++ b/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.h @@ -30,39 +30,39 @@ public: static void Initialize(); - virtual bool GetRegisterValue(uint32_t set, uint32_t reg, - DNBRegisterValue *value); - virtual bool SetRegisterValue(uint32_t set, uint32_t reg, - const DNBRegisterValue *value); - virtual nub_size_t GetRegisterContext(void *buf, nub_size_t buf_len); - virtual nub_size_t SetRegisterContext(const void *buf, nub_size_t buf_len); - virtual uint32_t SaveRegisterState(); - virtual bool RestoreRegisterState(uint32_t save_id); - - virtual kern_return_t GetRegisterState(int set, bool force); - virtual kern_return_t SetRegisterState(int set); - virtual bool RegisterSetStateIsValid(int set) const; - - virtual uint64_t GetPC(uint64_t failValue); // Get program counter - virtual kern_return_t SetPC(uint64_t value); - virtual uint64_t GetSP(uint64_t failValue); // Get stack pointer - virtual void ThreadWillResume(); - virtual bool ThreadDidStop(); - virtual bool NotifyException(MachException::Data &exc); - - virtual uint32_t NumSupportedHardwareBreakpoints(); - virtual uint32_t NumSupportedHardwareWatchpoints(); - - virtual uint32_t EnableHardwareBreakpoint(nub_addr_t addr, nub_size_t size, - bool also_set_on_task); - virtual bool DisableHardwareBreakpoint(uint32_t hw_break_index, - bool also_set_on_task); - virtual uint32_t EnableHardwareWatchpoint(nub_addr_t addr, nub_size_t size, - bool read, bool write, - bool also_set_on_task); - virtual bool DisableHardwareWatchpoint(uint32_t hw_break_index, - bool also_set_on_task); - virtual uint32_t GetHardwareWatchpointHit(nub_addr_t &addr); + bool GetRegisterValue(uint32_t set, uint32_t reg, + DNBRegisterValue *value) override; + bool SetRegisterValue(uint32_t set, uint32_t reg, + const DNBRegisterValue *value) override; + nub_size_t GetRegisterContext(void *buf, nub_size_t buf_len) override; + nub_size_t SetRegisterContext(const void *buf, nub_size_t buf_len) override; + uint32_t SaveRegisterState() override; + bool RestoreRegisterState(uint32_t save_id) override; + + kern_return_t GetRegisterState(int set, bool force) override; + kern_return_t SetRegisterState(int set) override; + bool RegisterSetStateIsValid(int set) const override; + + uint64_t GetPC(uint64_t failValue) override; // Get program counter + kern_return_t SetPC(uint64_t value) override; + uint64_t GetSP(uint64_t failValue) override; // Get stack pointer + void ThreadWillResume() override; + bool ThreadDidStop() override; + bool NotifyException(MachException::Data &exc) override; + + uint32_t NumSupportedHardwareBreakpoints() override; + uint32_t NumSupportedHardwareWatchpoints() override; + + uint32_t EnableHardwareBreakpoint(nub_addr_t addr, nub_size_t size, + bool also_set_on_task) override; + bool DisableHardwareBreakpoint(uint32_t hw_break_index, + bool also_set_on_task) override; + uint32_t EnableHardwareWatchpoint(nub_addr_t addr, nub_size_t size, + bool read, bool write, + bool also_set_on_task) override; + bool DisableHardwareWatchpoint(uint32_t hw_break_index, + bool also_set_on_task) override; + uint32_t GetHardwareWatchpointHit(nub_addr_t &addr) override; protected: kern_return_t EnableHardwareSingleStep(bool enable); @@ -232,9 +232,9 @@ protected: static bool IsWatchpointHit(const DBG &debug_state, uint32_t hw_index); static nub_addr_t GetWatchAddress(const DBG &debug_state, uint32_t hw_index); - virtual bool StartTransForHWP(); - virtual bool RollbackTransForHWP(); - virtual bool FinishTransForHWP(); + bool StartTransForHWP() override; + bool RollbackTransForHWP() override; + bool FinishTransForHWP() override; DBG GetDBGCheckpoint(); MachThread *m_thread; -- 2.7.4