Index: source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h =================================================================== --- source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h +++ source/Plugins/Instruction/ARM64/EmulateInstructionARM64.h @@ -18,6 +18,14 @@ class EmulateInstructionARM64 : public lldb_private::EmulateInstruction { public: + EmulateInstructionARM64(const lldb_private::ArchSpec &arch) : + EmulateInstruction(arch), + m_opcode_pstate(), + m_emulated_pstate(), + m_ignore_conditions(false) + { + } + static void Initialize (); @@ -50,61 +58,46 @@ return false; } - virtual lldb_private::ConstString - GetPluginName(); + lldb_private::ConstString + GetPluginName() override; - virtual lldb_private::ConstString - GetShortPluginName() + uint32_t + GetPluginVersion() override { - return GetPluginNameStatic(); - } - - virtual uint32_t - GetPluginVersion() - { return 1; } bool - SetTargetTriple (const lldb_private::ArchSpec &arch); + SetTargetTriple(const lldb_private::ArchSpec &arch) override; - EmulateInstructionARM64 (const lldb_private::ArchSpec &arch) : - EmulateInstruction (arch), - m_opcode_pstate (), - m_emulated_pstate (), - m_ignore_conditions (false) + bool + SupportsEmulatingInstructionsOfType(lldb_private::InstructionType inst_type) override { - } - - virtual bool - SupportsEmulatingInstructionsOfType (lldb_private::InstructionType inst_type) - { return SupportsEmulatingInstructionsOfTypeStatic (inst_type); } - virtual bool - ReadInstruction (); + bool + ReadInstruction() override; - virtual bool - EvaluateInstruction (uint32_t evaluate_options); + bool + EvaluateInstruction(uint32_t evaluate_options) override; - virtual bool - TestEmulation (lldb_private::Stream *out_stream, - lldb_private::ArchSpec &arch, - lldb_private::OptionValueDictionary *test_data) + bool + TestEmulation(lldb_private::Stream *out_stream, + lldb_private::ArchSpec &arch, + lldb_private::OptionValueDictionary *test_data) override { return false; } - virtual bool - GetRegisterInfo (lldb::RegisterKind reg_kind, - uint32_t reg_num, - lldb_private::RegisterInfo ®_info); + bool + GetRegisterInfo(lldb::RegisterKind reg_kind, + uint32_t reg_num, + lldb_private::RegisterInfo ®_info) override; - virtual bool - CreateFunctionEntryUnwind (lldb_private::UnwindPlan &unwind_plan); + bool + CreateFunctionEntryUnwind(lldb_private::UnwindPlan &unwind_plan) override; - typedef enum { AddrMode_OFF, @@ -303,4 +296,4 @@ bool m_ignore_conditions; }; -#endif // EmulateInstructionARM64_h_ +#endif // EmulateInstructionARM64_h_ Index: source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.h =================================================================== --- source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.h +++ source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.h @@ -19,7 +19,7 @@ class MCContext; class MCInstrInfo; class MCInst; -} +} // namespace llvm #include "lldb/Core/EmulateInstruction.h" #include "lldb/Core/Error.h" @@ -28,6 +28,8 @@ class EmulateInstructionMIPS : public lldb_private::EmulateInstruction { public: + EmulateInstructionMIPS(const lldb_private::ArchSpec &arch); + static void Initialize (); @@ -60,55 +62,46 @@ return false; } - virtual lldb_private::ConstString - GetPluginName(); + lldb_private::ConstString + GetPluginName() override; - virtual lldb_private::ConstString - GetShortPluginName() + uint32_t + GetPluginVersion() override { - return GetPluginNameStatic(); - } - - virtual uint32_t - GetPluginVersion() - { return 1; } bool - SetTargetTriple (const lldb_private::ArchSpec &arch); + SetTargetTriple(const lldb_private::ArchSpec &arch) override; - EmulateInstructionMIPS (const lldb_private::ArchSpec &arch); - - virtual bool - SupportsEmulatingInstructionsOfType (lldb_private::InstructionType inst_type) + bool + SupportsEmulatingInstructionsOfType(lldb_private::InstructionType inst_type) override { return SupportsEmulatingInstructionsOfTypeStatic (inst_type); } - virtual bool - ReadInstruction (); + bool + ReadInstruction() override; - virtual bool - EvaluateInstruction (uint32_t evaluate_options); + bool + EvaluateInstruction(uint32_t evaluate_options) override; - virtual bool - TestEmulation (lldb_private::Stream *out_stream, - lldb_private::ArchSpec &arch, - lldb_private::OptionValueDictionary *test_data) + bool + TestEmulation(lldb_private::Stream *out_stream, + lldb_private::ArchSpec &arch, + lldb_private::OptionValueDictionary *test_data) override { return false; } - virtual bool - GetRegisterInfo (lldb::RegisterKind reg_kind, - uint32_t reg_num, - lldb_private::RegisterInfo ®_info); + bool + GetRegisterInfo(lldb::RegisterKind reg_kind, + uint32_t reg_num, + lldb_private::RegisterInfo ®_info) override; - virtual bool - CreateFunctionEntryUnwind (lldb_private::UnwindPlan &unwind_plan); + bool + CreateFunctionEntryUnwind(lldb_private::UnwindPlan &unwind_plan) override; - protected: typedef struct @@ -310,4 +303,4 @@ std::unique_ptr m_insn_info; }; -#endif // EmulateInstructionMIPS_h_ +#endif // EmulateInstructionMIPS_h_ Index: source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h =================================================================== --- source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h +++ source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h @@ -19,7 +19,7 @@ class MCContext; class MCInstrInfo; class MCInst; -} +} // namespace llvm #include "lldb/Core/EmulateInstruction.h" #include "lldb/Core/Error.h" @@ -28,6 +28,8 @@ class EmulateInstructionMIPS64 : public lldb_private::EmulateInstruction { public: + EmulateInstructionMIPS64(const lldb_private::ArchSpec &arch); + static void Initialize (); @@ -60,55 +62,46 @@ return false; } - virtual lldb_private::ConstString - GetPluginName(); + lldb_private::ConstString + GetPluginName() override; - virtual lldb_private::ConstString - GetShortPluginName() + uint32_t + GetPluginVersion() override { - return GetPluginNameStatic(); - } - - virtual uint32_t - GetPluginVersion() - { return 1; } bool - SetTargetTriple (const lldb_private::ArchSpec &arch); + SetTargetTriple(const lldb_private::ArchSpec &arch) override; - EmulateInstructionMIPS64 (const lldb_private::ArchSpec &arch); - - virtual bool - SupportsEmulatingInstructionsOfType (lldb_private::InstructionType inst_type) + bool + SupportsEmulatingInstructionsOfType(lldb_private::InstructionType inst_type) override { return SupportsEmulatingInstructionsOfTypeStatic (inst_type); } - virtual bool - ReadInstruction (); + bool + ReadInstruction() override; - virtual bool - EvaluateInstruction (uint32_t evaluate_options); + bool + EvaluateInstruction(uint32_t evaluate_options) override; - virtual bool - TestEmulation (lldb_private::Stream *out_stream, - lldb_private::ArchSpec &arch, - lldb_private::OptionValueDictionary *test_data) + bool + TestEmulation(lldb_private::Stream *out_stream, + lldb_private::ArchSpec &arch, + lldb_private::OptionValueDictionary *test_data) override { return false; } - virtual bool - GetRegisterInfo (lldb::RegisterKind reg_kind, - uint32_t reg_num, - lldb_private::RegisterInfo ®_info); + bool + GetRegisterInfo(lldb::RegisterKind reg_kind, + uint32_t reg_num, + lldb_private::RegisterInfo ®_info) override; - virtual bool - CreateFunctionEntryUnwind (lldb_private::UnwindPlan &unwind_plan); + bool + CreateFunctionEntryUnwind(lldb_private::UnwindPlan &unwind_plan) override; - protected: typedef struct @@ -316,4 +309,4 @@ std::unique_ptr m_insn_info; }; -#endif // EmulateInstructionMIPS64_h_ +#endif // EmulateInstructionMIPS64_h_ Index: source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.h =================================================================== --- source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.h +++ source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.h @@ -37,23 +37,28 @@ static lldb::InstrumentationRuntimeType GetTypeStatic(); - virtual - ~AddressSanitizerRuntime(); + ~AddressSanitizerRuntime() override; - virtual lldb_private::ConstString - GetPluginName() { return GetPluginNameStatic(); } + lldb_private::ConstString + GetPluginName() override + { + return GetPluginNameStatic(); + } virtual lldb::InstrumentationRuntimeType GetType() { return GetTypeStatic(); } - virtual uint32_t - GetPluginVersion() { return 1; } + uint32_t + GetPluginVersion() override + { + return 1; + } - virtual void - ModulesDidLoad(lldb_private::ModuleList &module_list); + void + ModulesDidLoad(lldb_private::ModuleList &module_list) override; - virtual bool - IsActive(); + bool + IsActive() override; private: @@ -78,9 +83,8 @@ lldb::ModuleSP m_runtime_module; lldb::ProcessSP m_process; lldb::user_id_t m_breakpoint_id; - }; } // namespace lldb_private -#endif // liblldb_InstrumentationRuntime_h_ +#endif // liblldb_AddressSanitizerRuntime_h_ Index: source/Plugins/MemoryHistory/asan/MemoryHistoryASan.h =================================================================== --- source/Plugins/MemoryHistory/asan/MemoryHistoryASan.h +++ source/Plugins/MemoryHistory/asan/MemoryHistoryASan.h @@ -24,6 +24,7 @@ class MemoryHistoryASan : public lldb_private::MemoryHistory { public: + ~MemoryHistoryASan () override = default; static lldb::MemoryHistorySP CreateInstance (const lldb::ProcessSP &process_sp); @@ -37,26 +38,28 @@ static lldb_private::ConstString GetPluginNameStatic(); - virtual - ~MemoryHistoryASan () {} + lldb_private::ConstString + GetPluginName() override + { + return GetPluginNameStatic(); + } - virtual lldb_private::ConstString - GetPluginName() { return GetPluginNameStatic(); } + uint32_t + GetPluginVersion() override + { + return 1; + } + + lldb_private::HistoryThreads + GetHistoryThreads(lldb::addr_t address) override; - virtual uint32_t - GetPluginVersion() { return 1; } - - virtual lldb_private::HistoryThreads - GetHistoryThreads(lldb::addr_t address); - private: MemoryHistoryASan(const lldb::ProcessSP &process_sp); lldb::ProcessSP m_process_sp; - }; } // namespace lldb_private -#endif // liblldb_MemoryHistoryASan_h_ +#endif // liblldb_MemoryHistoryASan_h_ Index: source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.h =================================================================== --- source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.h +++ source/Plugins/ScriptInterpreter/None/ScriptInterpreterNone.h @@ -20,14 +20,14 @@ public: ScriptInterpreterNone(CommandInterpreter &interpreter); - ~ScriptInterpreterNone(); + ~ScriptInterpreterNone() override; bool ExecuteOneLine(const char *command, CommandReturnObject *result, - const ExecuteScriptOptions &options = ExecuteScriptOptions()); + const ExecuteScriptOptions &options = ExecuteScriptOptions()) override; void - ExecuteInterpreterLoop(); + ExecuteInterpreterLoop() override; //------------------------------------------------------------------ // Static Functions @@ -50,13 +50,13 @@ //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ - virtual lldb_private::ConstString - GetPluginName(); + lldb_private::ConstString + GetPluginName() override; - virtual uint32_t - GetPluginVersion(); + uint32_t + GetPluginVersion() override; }; } // namespace lldb_private -#endif // #ifndef liblldb_ScriptInterpreterNone_h_ +#endif // liblldb_ScriptInterpreterNone_h_ Index: source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h =================================================================== --- source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h +++ source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h @@ -42,7 +42,7 @@ Py_XINCREF(GetValue()); } - virtual ~StructuredPythonObject() + ~StructuredPythonObject() override { if (Py_IsInitialized()) Py_XDECREF(GetValue()); @@ -165,10 +165,10 @@ PythonString (const PythonObject &object); PythonString (llvm::StringRef string); PythonString (const char *string); - virtual ~PythonString (); + ~PythonString() override; - virtual bool - Reset (PyObject* py_obj = NULL); + bool + Reset(PyObject* py_obj = NULL) override; llvm::StringRef GetString() const; @@ -189,10 +189,10 @@ PythonInteger (PyObject* py_obj); PythonInteger (const PythonObject &object); PythonInteger (int64_t value); - virtual ~PythonInteger (); + ~PythonInteger() override; - virtual bool - Reset (PyObject* py_obj = NULL); + bool + Reset(PyObject* py_obj = NULL) override; int64_t GetInteger() const; @@ -210,10 +210,10 @@ PythonList (PyObject* py_obj); PythonList (const PythonObject &object); PythonList (uint32_t count); - virtual ~PythonList (); + ~PythonList() override; - virtual bool - Reset (PyObject* py_obj = NULL); + bool + Reset(PyObject* py_obj = NULL) override; uint32_t GetSize() const; @@ -235,10 +235,10 @@ explicit PythonDictionary (bool create_empty); PythonDictionary (PyObject* object); PythonDictionary (const PythonObject &object); - virtual ~PythonDictionary (); + ~PythonDictionary() override; - virtual bool - Reset (PyObject* object = NULL); + bool + Reset(PyObject* object = NULL) override; uint32_t GetSize() const; Index: source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h =================================================================== --- source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h +++ source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h @@ -388,7 +388,6 @@ return m_dictionary_name.c_str(); } - PyThreadState * GetThreadState() { @@ -433,10 +432,10 @@ //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ - virtual lldb_private::ConstString + lldb_private::ConstString GetPluginName() override; - virtual uint32_t + uint32_t GetPluginVersion() override; protected: @@ -519,6 +518,7 @@ // FILE* m_tmp_fh; PyGILState_STATE m_GILState; }; + protected: enum class AddLocation { @@ -553,6 +553,7 @@ eIOHandlerBreakpoint, eIOHandlerWatchpoint }; + PythonObject & GetMainModule (); Index: source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h =================================================================== --- source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h +++ source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.h @@ -20,31 +20,28 @@ { public: - virtual - ~UnwindAssemblyInstEmulation () - { - } + ~UnwindAssemblyInstEmulation() override = default; - virtual bool - GetNonCallSiteUnwindPlanFromAssembly (lldb_private::AddressRange& func, - lldb_private::Thread& thread, - lldb_private::UnwindPlan& unwind_plan); + bool + GetNonCallSiteUnwindPlanFromAssembly(lldb_private::AddressRange& func, + lldb_private::Thread& thread, + lldb_private::UnwindPlan& unwind_plan) override; - virtual bool - AugmentUnwindPlanFromCallSite (lldb_private::AddressRange& func, - lldb_private::Thread& thread, - lldb_private::UnwindPlan& unwind_plan); + bool + AugmentUnwindPlanFromCallSite(lldb_private::AddressRange& func, + lldb_private::Thread& thread, + lldb_private::UnwindPlan& unwind_plan) override; - virtual bool - GetFastUnwindPlan (lldb_private::AddressRange& func, - lldb_private::Thread& thread, - lldb_private::UnwindPlan &unwind_plan); + bool + GetFastUnwindPlan(lldb_private::AddressRange& func, + lldb_private::Thread& thread, + lldb_private::UnwindPlan &unwind_plan) override; // thread may be NULL in which case we only use the Target (e.g. if this is called pre-process-launch). - virtual bool - FirstNonPrologueInsn (lldb_private::AddressRange& func, - const lldb_private::ExecutionContext &exe_ctx, - lldb_private::Address& first_non_prologue_insn); + bool + FirstNonPrologueInsn(lldb_private::AddressRange& func, + const lldb_private::ExecutionContext &exe_ctx, + lldb_private::Address& first_non_prologue_insn) override; static lldb_private::UnwindAssembly * CreateInstance (const lldb_private::ArchSpec &arch); @@ -64,11 +61,11 @@ static const char * GetPluginDescriptionStatic(); - virtual lldb_private::ConstString - GetPluginName(); + lldb_private::ConstString + GetPluginName() override; - virtual uint32_t - GetPluginVersion(); + uint32_t + GetPluginVersion() override; private: Index: source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.h =================================================================== --- source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.h +++ source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.h @@ -19,33 +19,32 @@ { public: - ~UnwindAssembly_x86 (); + ~UnwindAssembly_x86() override; - virtual bool - GetNonCallSiteUnwindPlanFromAssembly (lldb_private::AddressRange& func, - lldb_private::Thread& thread, - lldb_private::UnwindPlan& unwind_plan); + bool + GetNonCallSiteUnwindPlanFromAssembly(lldb_private::AddressRange& func, + lldb_private::Thread& thread, + lldb_private::UnwindPlan& unwind_plan) override; - virtual bool - AugmentUnwindPlanFromCallSite (lldb_private::AddressRange& func, - lldb_private::Thread& thread, - lldb_private::UnwindPlan& unwind_plan); + bool + AugmentUnwindPlanFromCallSite(lldb_private::AddressRange& func, + lldb_private::Thread& thread, + lldb_private::UnwindPlan& unwind_plan) override; - virtual bool - GetFastUnwindPlan (lldb_private::AddressRange& func, - lldb_private::Thread& thread, - lldb_private::UnwindPlan &unwind_plan); + bool + GetFastUnwindPlan(lldb_private::AddressRange& func, + lldb_private::Thread& thread, + lldb_private::UnwindPlan &unwind_plan) override; // thread may be NULL in which case we only use the Target (e.g. if this is called pre-process-launch). - virtual bool - FirstNonPrologueInsn (lldb_private::AddressRange& func, - const lldb_private::ExecutionContext &exe_ctx, - lldb_private::Address& first_non_prologue_insn); + bool + FirstNonPrologueInsn(lldb_private::AddressRange& func, + const lldb_private::ExecutionContext &exe_ctx, + lldb_private::Address& first_non_prologue_insn) override; static lldb_private::UnwindAssembly * CreateInstance (const lldb_private::ArchSpec &arch); - //------------------------------------------------------------------ // PluginInterface protocol //------------------------------------------------------------------ @@ -61,11 +60,11 @@ static const char * GetPluginDescriptionStatic(); - virtual lldb_private::ConstString - GetPluginName(); + lldb_private::ConstString + GetPluginName() override; - virtual uint32_t - GetPluginVersion(); + uint32_t + GetPluginVersion() override; private: UnwindAssembly_x86 (const lldb_private::ArchSpec &arch, int cpu); @@ -74,5 +73,4 @@ lldb_private::ArchSpec m_arch; }; - #endif // liblldb_UnwindAssembly_x86_h_