Index: include/lldb/Core/Communication.h =================================================================== --- include/lldb/Core/Communication.h +++ include/lldb/Core/Communication.h @@ -100,7 +100,6 @@ typedef void (*ReadThreadBytesReceived) (void *baton, const void *src, size_t src_len); - //------------------------------------------------------------------ /// Construct the Communication object with the specified name for /// the Broadcaster that this object inherits from. @@ -118,8 +117,7 @@ /// /// The destructor is virtual since this class gets subclassed. //------------------------------------------------------------------ - virtual - ~Communication(); + ~Communication() override; void Clear (); @@ -177,6 +175,7 @@ { return m_connection_sp.get(); } + //------------------------------------------------------------------ /// Read bytes from the current connection. /// @@ -350,7 +349,7 @@ static ConstString &GetStaticBroadcasterClass (); - virtual ConstString &GetBroadcasterClass() const + ConstString &GetBroadcasterClass() const override { return GetStaticBroadcasterClass(); } @@ -361,7 +360,6 @@ //------------------------------------------------------------------ DISALLOW_COPY_AND_ASSIGN (Communication); - protected: lldb::ConnectionSP m_connection_sp; ///< The connection that is current in use by this communications class. HostThread m_read_thread; ///< The read thread handle in case we need to cancel the thread. @@ -381,6 +379,7 @@ uint32_t timeout_usec, lldb::ConnectionStatus &status, Error *error_ptr); + //------------------------------------------------------------------ /// Append new bytes that get read from the read thread into the /// internal object byte cache. This will cause a \b @@ -428,4 +427,4 @@ } // namespace lldb_private -#endif // liblldb_Communication_h_ +#endif // liblldb_Communication_h_ Index: include/lldb/Core/Debugger.h =================================================================== --- include/lldb/Core/Debugger.h +++ include/lldb/Core/Debugger.h @@ -9,9 +9,7 @@ #ifndef liblldb_Debugger_h_ #define liblldb_Debugger_h_ -#if defined(__cplusplus) - #include #include "lldb/lldb-public.h" @@ -32,8 +30,8 @@ namespace sys { class DynamicLibrary; -} -} +} // namespace sys +} // namespace llvm namespace lldb_private { @@ -44,7 +42,6 @@ /// Provides a global root objects for the debugger core. //---------------------------------------------------------------------- - class Debugger : public std::enable_shared_from_this, public UserID, @@ -79,8 +76,7 @@ static void Destroy (lldb::DebuggerSP &debugger_sp); - virtual - ~Debugger (); + ~Debugger() override; void Clear(); @@ -108,8 +104,6 @@ return m_error_file_sp; } - - void SetInputFileHandle (FILE *fh, bool tranfer_ownership); @@ -257,7 +251,6 @@ void SetLoggingCallback (lldb::LogOutputCallback log_callback, void *baton); - //---------------------------------------------------------------------- // Properties Functions //---------------------------------------------------------------------- @@ -268,11 +261,11 @@ eStopDisassemblyTypeAlways }; - virtual Error - SetPropertyValue (const ExecutionContext *exe_ctx, - VarSetOperationType op, - const char *property_path, - const char *value); + Error + SetPropertyValue(const ExecutionContext *exe_ctx, + VarSetOperationType op, + const char *property_path, + const char *value) override; bool GetAutoConfirm () const; @@ -456,10 +449,8 @@ Debugger (lldb::LogOutputCallback m_log_callback, void *baton); DISALLOW_COPY_AND_ASSIGN (Debugger); - }; } // namespace lldb_private -#endif // #if defined(__cplusplus) -#endif // liblldb_Debugger_h_ +#endif // liblldb_Debugger_h_ Index: include/lldb/Core/Disassembler.h =================================================================== --- include/lldb/Core/Disassembler.h +++ include/lldb/Core/Disassembler.h @@ -48,6 +48,7 @@ CalculateMnemonicOperandsAndCommentIfNeeded (exe_ctx); return m_opcode_name.c_str(); } + const char * GetOperands (const ExecutionContext* exe_ctx) { @@ -127,7 +128,6 @@ /// so this method can properly align the instruction opcodes. /// May be 0 to indicate no indentation/alignment of the opcodes. //------------------------------------------------------------------ - virtual void Dump (Stream *s, uint32_t max_opcode_byte_size, @@ -211,7 +211,6 @@ } }; - class InstructionList { public: @@ -263,33 +262,32 @@ PseudoInstruction (); - virtual - ~PseudoInstruction (); + ~PseudoInstruction() override; - virtual bool - DoesBranch (); + bool + DoesBranch() override; - virtual bool - HasDelaySlot (); + bool + HasDelaySlot() override; - virtual void - CalculateMnemonicOperandsAndComment (const ExecutionContext* exe_ctx) + void + CalculateMnemonicOperandsAndComment(const ExecutionContext* exe_ctx) override { // TODO: fill this in and put opcode name into Instruction::m_opcode_name, // mnemonic into Instruction::m_mnemonics, and any comment into // Instruction::m_comment } - virtual size_t - Decode (const Disassembler &disassembler, - const DataExtractor &data, - lldb::offset_t data_offset); + size_t + Decode(const Disassembler &disassembler, + const DataExtractor &data, + lldb::offset_t data_offset) override; void SetOpcode (size_t opcode_size, void *opcode_data); - virtual void - SetDescription (const char *description); + void + SetDescription(const char *description) override; protected: std::string m_description; @@ -411,7 +409,7 @@ // Constructors and Destructors //------------------------------------------------------------------ Disassembler(const ArchSpec &arch, const char *flavor); - virtual ~Disassembler(); + ~Disassembler() override; typedef const char * (*SummaryCallback)(const Instruction& inst, ExecutionContext *exe_context, void *user_data); @@ -484,4 +482,4 @@ } // namespace lldb_private -#endif // liblldb_Disassembler_h_ +#endif // liblldb_Disassembler_h_ Index: include/lldb/Core/EmulateInstruction.h =================================================================== --- include/lldb/Core/EmulateInstruction.h +++ include/lldb/Core/EmulateInstruction.h @@ -19,6 +19,8 @@ #include "lldb/Core/Opcode.h" #include "lldb/Core/RegisterValue.h" +namespace lldb_private { + //---------------------------------------------------------------------- /// @class EmulateInstruction EmulateInstruction.h "lldb/Core/EmulateInstruction.h" /// @brief A class that allows emulation of CPU opcodes. @@ -79,8 +81,6 @@ /// and emulating the instruction is just a bonus. //---------------------------------------------------------------------- -namespace lldb_private { - class EmulateInstruction : public PluginInterface { @@ -233,7 +233,6 @@ } ISAAndImmediateSigned; uint32_t isa; - } info; Context () : @@ -387,9 +386,8 @@ EmulateInstruction (const ArchSpec &arch); - virtual ~EmulateInstruction() - { - } + ~EmulateInstruction() override = default; + //---------------------------------------------------------------------- // Mandatory overrides //---------------------------------------------------------------------- @@ -530,7 +528,6 @@ return m_arch; } - static size_t ReadMemoryFrame (EmulateInstruction *instruction, void *baton, @@ -631,7 +628,6 @@ lldb::addr_t m_addr; Opcode m_opcode; - private: //------------------------------------------------------------------ // For EmulateInstruction only @@ -639,6 +635,6 @@ DISALLOW_COPY_AND_ASSIGN (EmulateInstruction); }; -} // namespace lldb_private +} // namespace lldb_private -#endif // lldb_EmulateInstruction_h_ +#endif // lldb_EmulateInstruction_h_ Index: include/lldb/Core/IOHandler.h =================================================================== --- include/lldb/Core/IOHandler.h +++ include/lldb/Core/IOHandler.h @@ -29,7 +29,7 @@ { class Application; typedef std::unique_ptr ApplicationAP; -} +} // namespace curses namespace lldb_private { @@ -257,7 +257,6 @@ private: DISALLOW_COPY_AND_ASSIGN (IOHandler); }; - //------------------------------------------------------------------ /// A delegate class for use with IOHandler subclasses. @@ -283,9 +282,7 @@ } virtual - ~IOHandlerDelegate() - { - } + ~IOHandlerDelegate() = default; virtual void IOHandlerActivated (IOHandler &io_handler) @@ -415,6 +412,7 @@ { return false; } + protected: Completion m_completion; // Support for common builtin completions bool m_io_handler_done; @@ -438,10 +436,7 @@ { } - virtual - ~IOHandlerDelegateMultiline () - { - } + ~IOHandlerDelegateMultiline() override = default; ConstString IOHandlerGetControlSequence (char ch) override @@ -467,11 +462,11 @@ } return false; } + protected: const std::string m_end_line; }; - class IOHandlerEditline : public IOHandler { public: @@ -499,8 +494,7 @@ uint32_t line_number_start, // If non-zero show line numbers starting at 'line_number_start' IOHandlerDelegate &delegate); - virtual - ~IOHandlerEditline (); + ~IOHandlerEditline() override; void Run () override; @@ -632,8 +626,7 @@ const char *prompt, bool default_response); - virtual - ~IOHandlerConfirm (); + ~IOHandlerConfirm() override; bool GetResponse () const @@ -694,14 +687,14 @@ public: IOHandlerCursesValueObjectList (Debugger &debugger, ValueObjectList &valobj_list); - virtual - ~IOHandlerCursesValueObjectList (); + ~IOHandlerCursesValueObjectList() override; void Run () override; void GotEOF() override; + protected: ValueObjectList m_valobj_list; }; @@ -717,9 +710,7 @@ { } - ~IOHandlerStack () - { - } + ~IOHandlerStack() = default; size_t GetSize () const @@ -830,17 +821,15 @@ PrintAsync (Stream *stream, const char *s, size_t len); protected: - typedef std::vector collection; collection m_stack; mutable Mutex m_mutex; IOHandler *m_top; private: - DISALLOW_COPY_AND_ASSIGN (IOHandlerStack); }; } // namespace lldb_private -#endif // #ifndef liblldb_IOHandler_h_ +#endif // liblldb_IOHandler_h_ Index: include/lldb/Core/Log.h =================================================================== --- include/lldb/Core/Log.h +++ include/lldb/Core/Log.h @@ -182,13 +182,12 @@ DISALLOW_COPY_AND_ASSIGN(Log); }; - class LogChannel : public PluginInterface { public: LogChannel(); - virtual ~LogChannel(); + ~LogChannel() override; static lldb::LogChannelSP FindPlugin(const char *plugin_name); @@ -209,7 +208,6 @@ DISALLOW_COPY_AND_ASSIGN(LogChannel); }; - } // namespace lldb_private -#endif // liblldb_Log_H_ +#endif // liblldb_Log_h_ Index: include/lldb/Core/Module.h =================================================================== --- include/lldb/Core/Module.h +++ include/lldb/Core/Module.h @@ -11,6 +11,7 @@ #define liblldb_Module_h_ #include + #include "lldb/lldb-forward.h" #include "lldb/Core/ArchSpec.h" #include "lldb/Core/UUID.h" @@ -100,8 +101,7 @@ //------------------------------------------------------------------ /// Destructor. //------------------------------------------------------------------ - virtual - ~Module (); + ~Module() override; bool MatchesModuleSpec (const ModuleSpec &module_ref); @@ -155,11 +155,11 @@ /// /// @see SymbolContextScope //------------------------------------------------------------------ - virtual void - CalculateSymbolContext (SymbolContext* sc); + void + CalculateSymbolContext(SymbolContext* sc) override; - virtual lldb::ModuleSP - CalculateSymbolContextModule (); + lldb::ModuleSP + CalculateSymbolContextModule() override; void GetDescription (Stream *s, @@ -208,10 +208,9 @@ /// /// @see SymbolContextScope //------------------------------------------------------------------ - virtual void - DumpSymbolContext (Stream *s); + void + DumpSymbolContext(Stream *s) override; - //------------------------------------------------------------------ /// Find a symbol in the object file's symbol table. /// @@ -289,7 +288,6 @@ FindCompileUnits (const FileSpec &path, bool append, SymbolContextList &sc_list); - //------------------------------------------------------------------ /// Find functions by name. @@ -936,7 +934,6 @@ uint32_t ResolveSymbolContextsForFileSpec (const FileSpec &file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList& sc_list); - void SetFileSpecAndObjectName (const FileSpec &file, const ConstString &object_name); @@ -1042,7 +1039,6 @@ bool RemapSourceFile (const char *path, std::string &new_path) const; - //------------------------------------------------------------------ /// Prepare to do a function name lookup. /// @@ -1184,7 +1180,6 @@ friend class SymbolFile; private: - Module (); // Only used internally by CreateJITModule () size_t @@ -1195,10 +1190,9 @@ size_t max_matches, TypeMap& types); - DISALLOW_COPY_AND_ASSIGN (Module); }; } // namespace lldb_private -#endif // liblldb_Module_h_ +#endif // liblldb_Module_h_ Index: include/lldb/Core/SearchFilter.h =================================================================== --- include/lldb/Core/SearchFilter.h +++ include/lldb/Core/SearchFilter.h @@ -272,7 +272,7 @@ { public: SearchFilterForUnconstrainedSearches (const lldb::TargetSP &target_sp) : SearchFilter(target_sp) {} - ~SearchFilterForUnconstrainedSearches () {} + ~SearchFilterForUnconstrainedSearches() override = default; bool ModulePasses (const FileSpec &module_spec) override; @@ -283,7 +283,6 @@ protected: lldb::SearchFilterSP DoCopyForBreakpoint (Breakpoint &breakpoint) override; - }; //---------------------------------------------------------------------- @@ -311,8 +310,7 @@ SearchFilterByModule (const SearchFilterByModule& rhs); - virtual - ~SearchFilterByModule (); + ~SearchFilterByModule() override; const SearchFilterByModule& operator=(const SearchFilterByModule& rhs); @@ -372,8 +370,7 @@ SearchFilterByModuleList (const SearchFilterByModuleList& rhs); - virtual - ~SearchFilterByModuleList (); + ~SearchFilterByModuleList() override; const SearchFilterByModuleList& operator=(const SearchFilterByModuleList& rhs); @@ -434,8 +431,7 @@ SearchFilterByModuleListAndCU (const SearchFilterByModuleListAndCU& rhs); - virtual - ~SearchFilterByModuleListAndCU (); + ~SearchFilterByModuleListAndCU() override; const SearchFilterByModuleListAndCU& operator=(const SearchFilterByModuleListAndCU& rhs); @@ -472,4 +468,4 @@ } // namespace lldb_private -#endif // liblldb_SearchFilter_h_ +#endif // liblldb_SearchFilter_h_ Index: include/lldb/Core/StreamGDBRemote.h =================================================================== --- include/lldb/Core/StreamGDBRemote.h +++ include/lldb/Core/StreamGDBRemote.h @@ -29,8 +29,7 @@ uint32_t addr_size, lldb::ByteOrder byte_order); - virtual - ~StreamGDBRemote (); + ~StreamGDBRemote() override; //------------------------------------------------------------------ /// Output a block of data to the stream performing GDB-remote escaping. @@ -51,4 +50,4 @@ } // namespace lldb_private -#endif // liblldb_StreamGDBRemote_h_ +#endif // liblldb_StreamGDBRemote_h_ Index: include/lldb/Core/ValueObjectChild.h =================================================================== --- include/lldb/Core/ValueObjectChild.h +++ include/lldb/Core/ValueObjectChild.h @@ -26,71 +26,71 @@ class ValueObjectChild : public ValueObject { public: - virtual ~ValueObjectChild(); + ~ValueObjectChild() override; - virtual uint64_t - GetByteSize() + uint64_t + GetByteSize() override { return m_byte_size; } - virtual lldb::offset_t - GetByteOffset() + lldb::offset_t + GetByteOffset() override { return m_byte_offset; } - virtual uint32_t - GetBitfieldBitSize() + uint32_t + GetBitfieldBitSize() override { return m_bitfield_bit_size; } - virtual uint32_t - GetBitfieldBitOffset() + uint32_t + GetBitfieldBitOffset() override { return m_bitfield_bit_offset; } - virtual lldb::ValueType - GetValueType() const; + lldb::ValueType + GetValueType() const override; - virtual size_t - CalculateNumChildren(); + size_t + CalculateNumChildren() override; - virtual ConstString - GetTypeName(); + ConstString + GetTypeName() override; - virtual ConstString - GetQualifiedTypeName(); + ConstString + GetQualifiedTypeName() override; - virtual ConstString - GetDisplayTypeName(); + ConstString + GetDisplayTypeName() override; - virtual bool - IsInScope (); + bool + IsInScope() override; - virtual bool - IsBaseClass () + bool + IsBaseClass() override { return m_is_base_class; } - virtual bool - IsDereferenceOfParent () + bool + IsDereferenceOfParent() override { return m_is_deref_of_parent; } protected: - virtual bool - UpdateValue (); + bool + UpdateValue() override; - virtual LazyBool - CanUpdateWithInvalidExecutionContext (); + LazyBool + CanUpdateWithInvalidExecutionContext() override; - virtual CompilerType - GetCompilerTypeImpl () + CompilerType + GetCompilerTypeImpl() override { return m_compiler_type; } @@ -113,6 +113,7 @@ friend class ValueObject; friend class ValueObjectConstResult; friend class ValueObjectConstResultImpl; + ValueObjectChild (ValueObject &parent, const CompilerType &compiler_type, const ConstString &name, Index: include/lldb/Core/ValueObjectConstResult.h =================================================================== --- include/lldb/Core/ValueObjectConstResult.h +++ include/lldb/Core/ValueObjectConstResult.h @@ -26,6 +26,8 @@ class ValueObjectConstResult : public ValueObject { public: + ~ValueObjectConstResult() override; + static lldb::ValueObjectSP Create (ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, @@ -67,79 +69,76 @@ Create (ExecutionContextScope *exe_scope, const Error& error); - virtual ~ValueObjectConstResult(); + uint64_t + GetByteSize() override; - virtual uint64_t - GetByteSize(); + lldb::ValueType + GetValueType() const override; - virtual lldb::ValueType - GetValueType() const; + size_t + CalculateNumChildren() override; - virtual size_t - CalculateNumChildren(); + ConstString + GetTypeName() override; - virtual ConstString - GetTypeName(); - - virtual ConstString - GetDisplayTypeName(); + ConstString + GetDisplayTypeName() override; - virtual bool - IsInScope (); + bool + IsInScope() override; void SetByteSize (size_t size); - virtual lldb::ValueObjectSP - Dereference (Error &error); + lldb::ValueObjectSP + Dereference(Error &error) override; - virtual ValueObject * - CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index); + ValueObject * + CreateChildAtIndex(size_t idx, bool synthetic_array_member, int32_t synthetic_index) override; - virtual lldb::ValueObjectSP - GetSyntheticChildAtOffset(uint32_t offset, const CompilerType& type, bool can_create); + lldb::ValueObjectSP + GetSyntheticChildAtOffset(uint32_t offset, const CompilerType& type, bool can_create) override; - virtual lldb::ValueObjectSP - AddressOf (Error &error); + lldb::ValueObjectSP + AddressOf(Error &error) override; - virtual lldb::addr_t - GetAddressOf (bool scalar_is_load_address = true, - AddressType *address_type = NULL); + lldb::addr_t + GetAddressOf(bool scalar_is_load_address = true, + AddressType *address_type = NULL) override; - virtual size_t - GetPointeeData (DataExtractor& data, - uint32_t item_idx = 0, - uint32_t item_count = 1); + size_t + GetPointeeData(DataExtractor& data, + uint32_t item_idx = 0, + uint32_t item_count = 1) override; - virtual lldb::addr_t - GetLiveAddress() + lldb::addr_t + GetLiveAddress() override { return m_impl.GetLiveAddress(); } - virtual void + void SetLiveAddress(lldb::addr_t addr = LLDB_INVALID_ADDRESS, - AddressType address_type = eAddressTypeLoad) + AddressType address_type = eAddressTypeLoad) override { - m_impl.SetLiveAddress(addr, - address_type); + m_impl.SetLiveAddress(addr, address_type); } - virtual lldb::ValueObjectSP - GetDynamicValue (lldb::DynamicValueType valueType); + lldb::ValueObjectSP + GetDynamicValue(lldb::DynamicValueType valueType) override; - virtual lldb::LanguageType - GetPreferredDisplayLanguage (); + lldb::LanguageType + GetPreferredDisplayLanguage() override; - virtual lldb::ValueObjectSP - Cast (const CompilerType &compiler_type); + lldb::ValueObjectSP + Cast(const CompilerType &compiler_type) override; protected: - virtual bool - UpdateValue (); + bool + UpdateValue() override; - virtual CompilerType - GetCompilerTypeImpl (); + CompilerType + GetCompilerTypeImpl() override; ConstString m_type_name; uint64_t m_byte_size; @@ -148,6 +147,7 @@ private: friend class ValueObjectConstResultImpl; + ValueObjectConstResult (ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size, Index: include/lldb/Core/ValueObjectDynamicValue.h =================================================================== --- include/lldb/Core/ValueObjectDynamicValue.h +++ include/lldb/Core/ValueObjectDynamicValue.h @@ -26,44 +26,43 @@ class ValueObjectDynamicValue : public ValueObject { public: - virtual - ~ValueObjectDynamicValue(); + ~ValueObjectDynamicValue() override; - virtual uint64_t - GetByteSize(); + uint64_t + GetByteSize() override; - virtual ConstString - GetTypeName(); + ConstString + GetTypeName() override; - virtual ConstString - GetQualifiedTypeName(); + ConstString + GetQualifiedTypeName() override; - virtual ConstString - GetDisplayTypeName(); + ConstString + GetDisplayTypeName() override; - virtual size_t - CalculateNumChildren(); + size_t + CalculateNumChildren() override; - virtual lldb::ValueType - GetValueType() const; + lldb::ValueType + GetValueType() const override; - virtual bool - IsInScope (); + bool + IsInScope() override; - virtual bool - IsDynamic () + bool + IsDynamic() override { return true; } - virtual bool - GetIsConstant () const + bool + GetIsConstant() const override { return false; } - virtual ValueObject * - GetParent() + ValueObject * + GetParent() override { if (m_parent) return m_parent->GetParent(); @@ -71,8 +70,8 @@ return NULL; } - virtual const ValueObject * - GetParent() const + const ValueObject * + GetParent() const override { if (m_parent) return m_parent->GetParent(); @@ -80,8 +79,8 @@ return NULL; } - virtual lldb::ValueObjectSP - GetStaticValue () + lldb::ValueObjectSP + GetStaticValue() override { return m_parent->GetSP(); } @@ -96,48 +95,48 @@ m_owning_valobj_sp = owning_sp; } - virtual bool - SetValueFromCString (const char *value_str, Error& error); + bool + SetValueFromCString(const char *value_str, Error& error) override; - virtual bool - SetData (DataExtractor &data, Error &error); + bool + SetData(DataExtractor &data, Error &error) override; - virtual TypeImpl - GetTypeImpl (); + TypeImpl + GetTypeImpl() override; - virtual lldb::LanguageType - GetPreferredDisplayLanguage (); + lldb::LanguageType + GetPreferredDisplayLanguage() override; void SetPreferredDisplayLanguage (lldb::LanguageType); - virtual bool - GetDeclaration (Declaration &decl); + bool + GetDeclaration(Declaration &decl) override; protected: - virtual bool - UpdateValue (); + bool + UpdateValue() override; - virtual LazyBool - CanUpdateWithInvalidExecutionContext () + LazyBool + CanUpdateWithInvalidExecutionContext() override { return eLazyBoolYes; } - virtual lldb::DynamicValueType - GetDynamicValueTypeImpl () + lldb::DynamicValueType + GetDynamicValueTypeImpl() override { return m_use_dynamic; } - virtual bool - HasDynamicValueTypeInfo () + bool + HasDynamicValueTypeInfo() override { return true; } - virtual CompilerType - GetCompilerTypeImpl (); + CompilerType + GetCompilerTypeImpl() override; Address m_address; ///< The variable that this value object is based upon TypeAndOrName m_dynamic_type_info; // We can have a type_sp or just a name @@ -158,4 +157,4 @@ } // namespace lldb_private -#endif // liblldb_ValueObjectDynamicValue_h_ +#endif // liblldb_ValueObjectDynamicValue_h_ Index: include/lldb/Core/ValueObjectMemory.h =================================================================== --- include/lldb/Core/ValueObjectMemory.h +++ include/lldb/Core/ValueObjectMemory.h @@ -26,6 +26,8 @@ class ValueObjectMemory : public ValueObject { public: + ~ValueObjectMemory() override; + static lldb::ValueObjectSP Create (ExecutionContextScope *exe_scope, const char *name, @@ -38,36 +40,33 @@ const Address &address, const CompilerType &ast_type); - virtual - ~ValueObjectMemory(); + uint64_t + GetByteSize() override; - virtual uint64_t - GetByteSize(); + ConstString + GetTypeName() override; - virtual ConstString - GetTypeName(); - - virtual ConstString - GetDisplayTypeName(); + ConstString + GetDisplayTypeName() override; - virtual size_t - CalculateNumChildren(); + size_t + CalculateNumChildren() override; - virtual lldb::ValueType - GetValueType() const; + lldb::ValueType + GetValueType() const override; - virtual bool - IsInScope (); + bool + IsInScope() override; - virtual lldb::ModuleSP - GetModule(); + lldb::ModuleSP + GetModule() override; protected: - virtual bool - UpdateValue (); + bool + UpdateValue() override; - virtual CompilerType - GetCompilerTypeImpl (); + CompilerType + GetCompilerTypeImpl() override; Address m_address; ///< The variable that this value object is based upon lldb::TypeSP m_type_sp; @@ -91,4 +90,4 @@ } // namespace lldb_private -#endif // liblldb_ValueObjectMemory_h_ +#endif // liblldb_ValueObjectMemory_h_ Index: include/lldb/Core/ValueObjectRegister.h =================================================================== --- include/lldb/Core/ValueObjectRegister.h +++ include/lldb/Core/ValueObjectRegister.h @@ -27,40 +27,38 @@ class ValueObjectRegisterContext : public ValueObject { public: + ~ValueObjectRegisterContext() override; - virtual - ~ValueObjectRegisterContext(); + uint64_t + GetByteSize() override; - virtual uint64_t - GetByteSize(); - - virtual lldb::ValueType - GetValueType () const + lldb::ValueType + GetValueType() const override { return lldb::eValueTypeRegisterSet; } - virtual ConstString - GetTypeName(); + ConstString + GetTypeName() override; - virtual ConstString - GetQualifiedTypeName(); + ConstString + GetQualifiedTypeName() override; - virtual ConstString - GetDisplayTypeName(); + ConstString + GetDisplayTypeName() override; - virtual size_t - CalculateNumChildren(); + size_t + CalculateNumChildren() override; - virtual ValueObject * - CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index); + ValueObject * + CreateChildAtIndex(size_t idx, bool synthetic_array_member, int32_t synthetic_index) override; protected: - virtual bool - UpdateValue (); + bool + UpdateValue() override; - virtual CompilerType - GetCompilerTypeImpl (); + CompilerType + GetCompilerTypeImpl() override; lldb::RegisterContextSP m_reg_ctx_sp; @@ -75,46 +73,44 @@ class ValueObjectRegisterSet : public ValueObject { public: + ~ValueObjectRegisterSet() override; + static lldb::ValueObjectSP Create (ExecutionContextScope *exe_scope, lldb::RegisterContextSP ®_ctx_sp, uint32_t set_idx); - virtual - ~ValueObjectRegisterSet(); + uint64_t + GetByteSize() override; - virtual uint64_t - GetByteSize(); - - virtual lldb::ValueType - GetValueType () const + lldb::ValueType + GetValueType() const override { return lldb::eValueTypeRegisterSet; } - virtual ConstString - GetTypeName(); + ConstString + GetTypeName() override; - virtual ConstString - GetQualifiedTypeName(); + ConstString + GetQualifiedTypeName() override; - virtual size_t - CalculateNumChildren(); + size_t + CalculateNumChildren() override; - virtual ValueObject * - CreateChildAtIndex (size_t idx, bool synthetic_array_member, int32_t synthetic_index); + ValueObject * + CreateChildAtIndex(size_t idx, bool synthetic_array_member, int32_t synthetic_index) override; - virtual lldb::ValueObjectSP - GetChildMemberWithName (const ConstString &name, bool can_create); + lldb::ValueObjectSP + GetChildMemberWithName(const ConstString &name, bool can_create) override; - virtual size_t - GetIndexOfChildWithName (const ConstString &name); + size_t + GetIndexOfChildWithName(const ConstString &name) override; - protected: - virtual bool - UpdateValue (); + bool + UpdateValue() override; - virtual CompilerType - GetCompilerTypeImpl (); + CompilerType + GetCompilerTypeImpl() override; lldb::RegisterContextSP m_reg_ctx_sp; const RegisterSet *m_reg_set; @@ -122,6 +118,7 @@ private: friend class ValueObjectRegisterContext; + ValueObjectRegisterSet (ExecutionContextScope *exe_scope, lldb::RegisterContextSP ®_ctx_sp, uint32_t set_idx); //------------------------------------------------------------------ @@ -133,45 +130,45 @@ class ValueObjectRegister : public ValueObject { public: + ~ValueObjectRegister() override; + static lldb::ValueObjectSP Create (ExecutionContextScope *exe_scope, lldb::RegisterContextSP ®_ctx_sp, uint32_t reg_num); - virtual - ~ValueObjectRegister(); + uint64_t + GetByteSize() override; - virtual uint64_t - GetByteSize(); - - virtual lldb::ValueType - GetValueType () const + lldb::ValueType + GetValueType() const override { return lldb::eValueTypeRegister; } - virtual ConstString - GetTypeName(); + ConstString + GetTypeName() override; - virtual size_t - CalculateNumChildren(); + size_t + CalculateNumChildren() override; - virtual bool - SetValueFromCString (const char *value_str, Error& error); + bool + SetValueFromCString(const char *value_str, Error& error) override; - virtual bool - SetData (DataExtractor &data, Error &error); + bool + SetData(DataExtractor &data, Error &error) override; - virtual bool - ResolveValue (Scalar &scalar); + bool + ResolveValue(Scalar &scalar) override; - virtual void - GetExpressionPath (Stream &s, bool qualify_cxx_base_classes, GetExpressionPathFormat epformat = eGetExpressionPathFormatDereferencePointers); + void + GetExpressionPath(Stream &s, bool qualify_cxx_base_classes, + GetExpressionPathFormat epformat = eGetExpressionPathFormatDereferencePointers) override; protected: - virtual bool - UpdateValue (); + bool + UpdateValue() override; - virtual CompilerType - GetCompilerTypeImpl (); + CompilerType + GetCompilerTypeImpl() override; lldb::RegisterContextSP m_reg_ctx_sp; RegisterInfo m_reg_info; @@ -184,6 +181,7 @@ ConstructObject (uint32_t reg_num); friend class ValueObjectRegisterSet; + ValueObjectRegister (ValueObject &parent, lldb::RegisterContextSP ®_ctx_sp, uint32_t reg_num); ValueObjectRegister (ExecutionContextScope *exe_scope, lldb::RegisterContextSP ®_ctx_sp, uint32_t reg_num); @@ -195,4 +193,4 @@ } // namespace lldb_private -#endif // liblldb_ValueObjectRegister_h_ +#endif // liblldb_ValueObjectRegister_h_