diff options
| author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2015-10-19 18:52:10 +0000 |
|---|---|---|
| committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2015-10-19 18:52:10 +0000 |
| commit | 0af149a81320e14a50d43791266dd2e5a7476535 (patch) | |
| tree | f6e7a61517dce8459305cc5bbc5d8b3d1ade6d44 /lldb/source/Plugins/Process | |
| parent | 755e502952335a36b0dd1ca31ca3ef992e4c0306 (diff) | |
| download | bcm5719-llvm-0af149a81320e14a50d43791266dd2e5a7476535.tar.gz bcm5719-llvm-0af149a81320e14a50d43791266dd2e5a7476535.zip | |
Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes.
Differential Revision: http://reviews.llvm.org/D13840
llvm-svn: 250721
Diffstat (limited to 'lldb/source/Plugins/Process')
9 files changed, 168 insertions, 137 deletions
diff --git a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h index 40eb4e189b4..840b8db75f6 100644 --- a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h +++ b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h @@ -1,4 +1,4 @@ -//===-- ProcessElfCore.h ---------------------------------------*- C++ -*-===// +//===-- ProcessElfCore.h ----------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -17,11 +17,13 @@ #ifndef liblldb_ProcessElfCore_h_ #define liblldb_ProcessElfCore_h_ +// C Includes // C++ Includes #include <list> #include <vector> // Other libraries and framework includes +// Project includes #include "lldb/Core/ConstString.h" #include "lldb/Core/Error.h" #include "lldb/Target/Process.h" @@ -60,8 +62,7 @@ public: lldb_private::Listener &listener, const lldb_private::FileSpec &core_file); - virtual - ~ProcessElfCore(); + ~ProcessElfCore() override; //------------------------------------------------------------------ // Check if a given Process @@ -157,4 +158,4 @@ private: AddAddressRangeFromLoadSegment(const elf::ELFProgramHeader *header); }; -#endif // liblldb_ProcessElffCore_h_ +#endif // liblldb_ProcessElfCore_h_ diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.h b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.h index 73e2ef7c3a9..0e74897b5b5 100644 --- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.h +++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm.h @@ -1,15 +1,19 @@ -//===-- RegisterContextCorePOSIX_arm.h -----------------------*- C++ -*-===// +//===-- RegisterContextCorePOSIX_arm.h --------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // -//===---------------------------------------------------------------------===// +//===----------------------------------------------------------------------===// -#ifndef liblldb_RegisterContextCorePOSIX_arm_H_ -#define liblldb_RegisterContextCorePOSIX_arm_H_ +#ifndef liblldb_RegisterContextCorePOSIX_arm_h_ +#define liblldb_RegisterContextCorePOSIX_arm_h_ +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "lldb/Core/DataBufferHeap.h" #include "Plugins/Process/Utility/RegisterContextPOSIX_arm.h" @@ -22,39 +26,41 @@ public: const lldb_private::DataExtractor &gpregset, const lldb_private::DataExtractor &fpregset); - ~RegisterContextCorePOSIX_arm(); + ~RegisterContextCorePOSIX_arm() override; - virtual bool - ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value); + bool + ReadRegister(const lldb_private::RegisterInfo *reg_info, + lldb_private::RegisterValue &value) override; - virtual bool - WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value); + bool + WriteRegister(const lldb_private::RegisterInfo *reg_info, + const lldb_private::RegisterValue &value) override; bool - ReadAllRegisterValues(lldb::DataBufferSP &data_sp); + ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override; bool - WriteAllRegisterValues(const lldb::DataBufferSP &data_sp); + WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override; bool - HardwareSingleStep(bool enable); + HardwareSingleStep(bool enable) override; protected: bool - ReadGPR(); + ReadGPR() override; bool - ReadFPR(); + ReadFPR() override; bool - WriteGPR(); + WriteGPR() override; bool - WriteFPR(); + WriteFPR() override; private: lldb::DataBufferSP m_gpr_buffer; lldb_private::DataExtractor m_gpr; }; -#endif // #ifndef liblldb_RegisterContextCorePOSIX_arm_H_ +#endif // liblldb_RegisterContextCorePOSIX_arm_h_ diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.h b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.h index 2e1d6b4f9ca..9b05edb1935 100644 --- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.h +++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_arm64.h @@ -1,15 +1,19 @@ -//===-- RegisterContextCorePOSIX_arm64.h -----------------------*- C++ -*-===// +//===-- RegisterContextCorePOSIX_arm64.h ------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // -//===---------------------------------------------------------------------===// +//===----------------------------------------------------------------------===// -#ifndef liblldb_RegisterContextCorePOSIX_arm64_H_ -#define liblldb_RegisterContextCorePOSIX_arm64_H_ +#ifndef liblldb_RegisterContextCorePOSIX_arm64_h_ +#define liblldb_RegisterContextCorePOSIX_arm64_h_ +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "lldb/Core/DataBufferHeap.h" #include "Plugins/Process/Utility/RegisterContextPOSIX_arm64.h" @@ -22,39 +26,41 @@ public: const lldb_private::DataExtractor &gpregset, const lldb_private::DataExtractor &fpregset); - ~RegisterContextCorePOSIX_arm64(); + ~RegisterContextCorePOSIX_arm64() override; - virtual bool - ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value); + bool + ReadRegister(const lldb_private::RegisterInfo *reg_info, + lldb_private::RegisterValue &value) override; - virtual bool - WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value); + bool + WriteRegister(const lldb_private::RegisterInfo *reg_info, + const lldb_private::RegisterValue &value) override; bool - ReadAllRegisterValues(lldb::DataBufferSP &data_sp); + ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override; bool - WriteAllRegisterValues(const lldb::DataBufferSP &data_sp); + WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override; bool - HardwareSingleStep(bool enable); + HardwareSingleStep(bool enable) override; protected: bool - ReadGPR(); + ReadGPR() override; bool - ReadFPR(); + ReadFPR() override; bool - WriteGPR(); + WriteGPR() override; bool - WriteFPR(); + WriteFPR() override; private: lldb::DataBufferSP m_gpr_buffer; lldb_private::DataExtractor m_gpr; }; -#endif // #ifndef liblldb_RegisterContextCorePOSIX_arm64_H_ +#endif // liblldb_RegisterContextCorePOSIX_arm64_h_ diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.h b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.h index ca29d4f0feb..6cbfd504b7d 100644 --- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.h +++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_mips64.h @@ -1,15 +1,19 @@ -//===-- RegisterContextCorePOSIX_mips64.h ----------------------*- C++ -*-===// +//===-- RegisterContextCorePOSIX_mips64.h -----------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // -//===---------------------------------------------------------------------===// +//===----------------------------------------------------------------------===// -#ifndef liblldb_RegisterContextCorePOSIX_mips64_H_ -#define liblldb_RegisterContextCorePOSIX_mips64_H_ +#ifndef liblldb_RegisterContextCorePOSIX_mips64_h_ +#define liblldb_RegisterContextCorePOSIX_mips64_h_ +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "lldb/Core/DataBufferHeap.h" #include "Plugins/Process/Utility/RegisterContextPOSIX_mips64.h" @@ -22,39 +26,41 @@ public: const lldb_private::DataExtractor &gpregset, const lldb_private::DataExtractor &fpregset); - ~RegisterContextCorePOSIX_mips64(); + ~RegisterContextCorePOSIX_mips64() override; - virtual bool - ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value); + bool + ReadRegister(const lldb_private::RegisterInfo *reg_info, + lldb_private::RegisterValue &value) override; - virtual bool - WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value); + bool + WriteRegister(const lldb_private::RegisterInfo *reg_info, + const lldb_private::RegisterValue &value) override; bool - ReadAllRegisterValues(lldb::DataBufferSP &data_sp); + ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override; bool - WriteAllRegisterValues(const lldb::DataBufferSP &data_sp); + WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override; bool - HardwareSingleStep(bool enable); + HardwareSingleStep(bool enable) override; protected: bool - ReadGPR(); + ReadGPR() override; bool - ReadFPR(); + ReadFPR() override; bool - WriteGPR(); + WriteGPR() override; bool - WriteFPR(); + WriteFPR() override; private: lldb::DataBufferSP m_gpr_buffer; lldb_private::DataExtractor m_gpr; }; -#endif // #ifndef liblldb_RegisterContextCorePOSIX_mips64_H_ +#endif // liblldb_RegisterContextCorePOSIX_mips64_h_ diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.h b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.h index a3590601fa7..0f587fd1459 100644 --- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.h +++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.h @@ -5,11 +5,15 @@ // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // -//===---------------------------------------------------------------------===// +//===----------------------------------------------------------------------===// -#ifndef liblldb_RegisterContextCorePOSIX_powerpc_H_ -#define liblldb_RegisterContextCorePOSIX_powerpc_H_ +#ifndef liblldb_RegisterContextCorePOSIX_powerpc_h_ +#define liblldb_RegisterContextCorePOSIX_powerpc_h_ +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "lldb/Core/DataBufferHeap.h" #include "Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h" @@ -23,41 +27,43 @@ public: const lldb_private::DataExtractor &fpregset, const lldb_private::DataExtractor &vregset); - ~RegisterContextCorePOSIX_powerpc(); + ~RegisterContextCorePOSIX_powerpc() override; - virtual bool - ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value); + bool + ReadRegister(const lldb_private::RegisterInfo *reg_info, + lldb_private::RegisterValue &value) override; - virtual bool - WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value); + bool + WriteRegister(const lldb_private::RegisterInfo *reg_info, + const lldb_private::RegisterValue &value) override; bool - ReadAllRegisterValues(lldb::DataBufferSP &data_sp); + ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override; bool - WriteAllRegisterValues(const lldb::DataBufferSP &data_sp); + WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override; bool - HardwareSingleStep(bool enable); + HardwareSingleStep(bool enable) override; protected: bool - ReadGPR(); + ReadGPR() override; bool - ReadFPR(); + ReadFPR() override; bool - ReadVMX(); + ReadVMX() override; bool - WriteGPR(); + WriteGPR() override; bool - WriteFPR(); + WriteFPR() override; bool - WriteVMX(); + WriteVMX() override; private: lldb::DataBufferSP m_gpr_buffer; @@ -68,4 +74,4 @@ private: lldb_private::DataExtractor m_vec; }; -#endif // #ifndef liblldb_RegisterContextCorePOSIX_powerpc_H_ +#endif // liblldb_RegisterContextCorePOSIX_powerpc_h_ diff --git a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h index ac0f49c3db5..60f2ad33b4a 100644 --- a/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h +++ b/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_x86_64.h @@ -1,15 +1,19 @@ -//===-- RegisterContextCorePOSIX_x86_64.h ----------------------*- C++ -*-===// +//===-- RegisterContextCorePOSIX_x86_64.h -----------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // -//===---------------------------------------------------------------------===// +//===----------------------------------------------------------------------===// -#ifndef liblldb_RegisterContextCorePOSIX_x86_64_H_ -#define liblldb_RegisterContextCorePOSIX_x86_64_H_ +#ifndef liblldb_RegisterContextCorePOSIX_x86_64_h_ +#define liblldb_RegisterContextCorePOSIX_x86_64_h_ +// C Includes +// C++ Includes +// Other libraries and framework includes +// Project includes #include "Plugins/Process/Utility/RegisterContextPOSIX_x86.h" class RegisterContextCorePOSIX_x86_64 : @@ -21,38 +25,40 @@ public: const lldb_private::DataExtractor &gpregset, const lldb_private::DataExtractor &fpregset); - ~RegisterContextCorePOSIX_x86_64(); + ~RegisterContextCorePOSIX_x86_64() override; - virtual bool - ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value); + bool + ReadRegister(const lldb_private::RegisterInfo *reg_info, + lldb_private::RegisterValue &value) override; - virtual bool - WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value); + bool + WriteRegister(const lldb_private::RegisterInfo *reg_info, + const lldb_private::RegisterValue &value) override; bool - ReadAllRegisterValues(lldb::DataBufferSP &data_sp); + ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override; bool - WriteAllRegisterValues(const lldb::DataBufferSP &data_sp); + WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override; bool - HardwareSingleStep(bool enable); + HardwareSingleStep(bool enable) override; protected: bool - ReadGPR(); + ReadGPR() override; bool - ReadFPR(); + ReadFPR() override; bool - WriteGPR(); + WriteGPR() override; bool - WriteFPR(); + WriteFPR() override; private: uint8_t *m_gpregset; }; -#endif // #ifndef liblldb_RegisterContextCorePOSIX_x86_64_H_ +#endif // liblldb_RegisterContextCorePOSIX_x86_64_h_ diff --git a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h index 9d4d769ddab..d3a42e0eb54 100644 --- a/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h +++ b/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h @@ -1,4 +1,4 @@ -//===-- ThreadElfCore.h ----------------------------------------*- C++ -*-===// +//===-- ThreadElfCore.h -----------------------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -10,8 +10,12 @@ #ifndef liblldb_ThreadElfCore_h_ #define liblldb_ThreadElfCore_h_ +// C Includes +// C++ Includes #include <string> +// Other libraries and framework includes +// Project includes #include "lldb/Target/Thread.h" #include "lldb/Core/DataExtractor.h" @@ -104,7 +108,6 @@ struct ELFLinuxPrPsInfo return 0; } } - }; struct ThreadData @@ -122,20 +125,19 @@ class ThreadElfCore : public lldb_private::Thread public: ThreadElfCore (lldb_private::Process &process, const ThreadData &td); - virtual - ~ThreadElfCore (); + ~ThreadElfCore() override; - virtual void - RefreshStateAfterStop(); + void + RefreshStateAfterStop() 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; - virtual void - ClearStackFrames (); + void + ClearStackFrames() override; static bool ThreadIDIsValid (lldb::tid_t thread) @@ -143,8 +145,8 @@ public: return thread != 0; } - virtual const char * - GetName () + const char * + GetName() override { if (m_thread_name.empty()) return NULL; @@ -152,7 +154,7 @@ public: } void - SetName (const char *name) + SetName(const char *name) override { if (name && name[0]) m_thread_name.assign (name); @@ -173,8 +175,7 @@ protected: lldb_private::DataExtractor m_fpregset_data; lldb_private::DataExtractor m_vregset_data; - virtual bool CalculateStopInfo(); - + bool CalculateStopInfo() override; }; -#endif // liblldb_ThreadElfCore_h_ +#endif // liblldb_ThreadElfCore_h_ diff --git a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.h b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.h index 27b30d50933..2de0b772370 100644 --- a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.h +++ b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.h @@ -11,12 +11,12 @@ #define liblldb_ProcessMachCore_h_ // C Includes - // C++ Includes #include <list> #include <vector> // Other libraries and framework includes +// Project includes #include "lldb/Core/ConstString.h" #include "lldb/Core/Error.h" #include "lldb/Target/Process.h" @@ -29,6 +29,12 @@ public: //------------------------------------------------------------------ // Constructors and Destructors //------------------------------------------------------------------ + ProcessMachCore(lldb::TargetSP target_sp, + lldb_private::Listener &listener, + const lldb_private::FileSpec &core_file); + + ~ProcessMachCore() override; + static lldb::ProcessSP CreateInstance (lldb::TargetSP target_sp, lldb_private::Listener &listener, @@ -47,16 +53,6 @@ public: GetPluginDescriptionStatic(); //------------------------------------------------------------------ - // Constructors and Destructors - //------------------------------------------------------------------ - ProcessMachCore(lldb::TargetSP target_sp, - lldb_private::Listener &listener, - const lldb_private::FileSpec &core_file); - - virtual - ~ProcessMachCore(); - - //------------------------------------------------------------------ // Check if a given Process //------------------------------------------------------------------ bool @@ -117,7 +113,7 @@ protected: void Clear ( ); - virtual bool + bool UpdateThreadList (lldb_private::ThreadList &old_thread_list, lldb_private::ThreadList &new_thread_list) override; @@ -161,8 +157,8 @@ private: lldb::addr_t m_dyld_addr; lldb::addr_t m_mach_kernel_addr; lldb_private::ConstString m_dyld_plugin_name; + DISALLOW_COPY_AND_ASSIGN (ProcessMachCore); - }; -#endif // liblldb_ProcessMachCore_h_ +#endif // liblldb_ProcessMachCore_h_ diff --git a/lldb/source/Plugins/Process/mach-core/ThreadMachCore.h b/lldb/source/Plugins/Process/mach-core/ThreadMachCore.h index 756a04a3cbd..25973540db1 100644 --- a/lldb/source/Plugins/Process/mach-core/ThreadMachCore.h +++ b/lldb/source/Plugins/Process/mach-core/ThreadMachCore.h @@ -10,8 +10,12 @@ #ifndef liblldb_ThreadMachCore_h_ #define liblldb_ThreadMachCore_h_ +// C Includes +// C++ Includes #include <string> +// Other libraries and framework includes +// Project includes #include "lldb/Target/Thread.h" class ProcessMachCore; @@ -22,20 +26,19 @@ public: ThreadMachCore (lldb_private::Process &process, lldb::tid_t tid); - virtual - ~ThreadMachCore (); + ~ThreadMachCore() override; - virtual void - RefreshStateAfterStop(); + void + RefreshStateAfterStop() override; - virtual const char * - GetName (); + const char * + GetName() 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; static bool ThreadIDIsValid (lldb::tid_t thread); @@ -47,7 +50,7 @@ public: GetBasicInfoAsString (); void - SetName (const char *name) + SetName(const char *name) override { if (name && name[0]) m_thread_name.assign (name); @@ -68,7 +71,6 @@ public: } protected: - friend class ProcessMachCore; //------------------------------------------------------------------ @@ -78,11 +80,12 @@ protected: std::string m_dispatch_queue_name; lldb::addr_t m_thread_dispatch_qaddr; lldb::RegisterContextSP m_thread_reg_ctx_sp; + //------------------------------------------------------------------ // Protected member functions. //------------------------------------------------------------------ - virtual bool - CalculateStopInfo (); + bool + CalculateStopInfo() override; }; -#endif // liblldb_ThreadMachCore_h_ +#endif // liblldb_ThreadMachCore_h_ |

