LLDB mainline
lldb_private::RegisterType Class Referenceabstract

#include <RegisterType.h>

Inheritance diagram for lldb_private::RegisterType:
[legend]

Public Types

enum  RegisterTypeKind {
  eRegisterTypeKindFlags , eRegisterTypeKindEnum , eRegisterTypeKindBuiltin , eRegisterTypeKindVector ,
  eRegisterTypeKindUnion
}

Public Member Functions

RegisterTypeKind getKind () const
 RegisterType (RegisterTypeKind kind, std::string id)
 RegisterType (const RegisterType &)=delete
RegisterType & operator= (const RegisterType &)=delete
 RegisterType (RegisterType &&)=delete
RegisterType & operator= (RegisterType &&)=delete
virtual void ToXML (Stream &strm, std::unordered_set< std::string > &previously_emitted, const RegisterType *user=nullptr) const
 Output XML that describes this type, to be inserted into a target XML file.
virtual ~RegisterType ()=default
virtual void ToXMLElement (Stream &strm, const RegisterType *user=nullptr) const =0
 Output the register type as an XML element.
const std::string & GetID () const
uint64_t GetUID () const
 Return an identifier unique among all RegisterType instances constructed during the lifetime of the LLDB host process.
virtual std::optional< uint64_t > GetByteSize () const
 Return this type's fixed size in bytes, if it has one.
void SetDependencies (std::vector< const RegisterType * > dependencies)

Static Public Member Functions

static void PrintXMLAttributeValue (Stream &strm, llvm::StringRef value)
 Print a string escaped for use as an XML attribute value.

Private Attributes

const RegisterTypeKind m_kind
const std::string m_id
const uint64_t m_uid
std::vector< const RegisterType * > m_dependencies

Detailed Description

Definition at line 26 of file RegisterType.h.

Member Enumeration Documentation

◆ RegisterTypeKind

Enumerator
eRegisterTypeKindFlags 
eRegisterTypeKindEnum 
eRegisterTypeKindBuiltin 
eRegisterTypeKindVector 
eRegisterTypeKindUnion 

Definition at line 28 of file RegisterType.h.

Constructor & Destructor Documentation

◆ RegisterType() [1/3]

◆ RegisterType() [2/3]

lldb_private::RegisterType::RegisterType ( const RegisterType & )
delete

References RegisterType().

◆ RegisterType() [3/3]

lldb_private::RegisterType::RegisterType ( RegisterType && )
delete

References RegisterType().

◆ ~RegisterType()

virtual lldb_private::RegisterType::~RegisterType ( )
virtualdefault

Member Function Documentation

◆ GetByteSize()

virtual std::optional< uint64_t > lldb_private::RegisterType::GetByteSize ( ) const
inlinevirtual

Return this type's fixed size in bytes, if it has one.

No byte size means it depends on the target.

Reimplemented in lldb_private::RegisterTypeBuiltin, lldb_private::RegisterTypeUnion, and lldb_private::RegisterTypeVector.

Definition at line 71 of file RegisterType.h.

Referenced by lldb_private::RegisterTypeBuilderClang::GetExpectedByteSize().

◆ GetID()

◆ getKind()

◆ GetUID()

uint64_t lldb_private::RegisterType::GetUID ( ) const
inline

◆ operator=() [1/2]

RegisterType & lldb_private::RegisterType::operator= ( const RegisterType & )
delete

References RegisterType().

◆ operator=() [2/2]

RegisterType & lldb_private::RegisterType::operator= ( RegisterType && )
delete

References RegisterType().

◆ PrintXMLAttributeValue()

void RegisterType::PrintXMLAttributeValue ( Stream & strm,
llvm::StringRef value )
static

◆ SetDependencies()

void lldb_private::RegisterType::SetDependencies ( std::vector< const RegisterType * > dependencies)
inline

◆ ToXML()

void RegisterType::ToXML ( Stream & strm,
std::unordered_set< std::string > & previously_emitted,
const RegisterType * user = nullptr ) const
virtual

Output XML that describes this type, to be inserted into a target XML file.

Reserved characters like "<" are replaced with their XML safe equivalents like "&lt;".

Reimplemented in lldb_private::RegisterTypeBuiltin.

Definition at line 35 of file RegisterType.cpp.

References GetID(), m_dependencies, RegisterType(), and ToXMLElement().

Referenced by lldb_private::process_gdb_remote::GDBRemoteCommunicationServerLLGS::BuildTargetXml().

◆ ToXMLElement()

virtual void lldb_private::RegisterType::ToXMLElement ( Stream & strm,
const RegisterType * user = nullptr ) const
pure virtual

Output the register type as an XML element.

That is, "<foo ...>" until the closing </foo>, including any child types in between. For example the flags in a register flag set.

Implemented in lldb_private::RegisterTypeBuiltin, lldb_private::RegisterTypeEnum, lldb_private::RegisterTypeFlags, lldb_private::RegisterTypeUnion, and lldb_private::RegisterTypeVector.

References RegisterType().

Referenced by ToXML().

Member Data Documentation

◆ m_dependencies

std::vector<const RegisterType *> lldb_private::RegisterType::m_dependencies
private

Definition at line 81 of file RegisterType.h.

Referenced by SetDependencies(), and ToXML().

◆ m_id

const std::string lldb_private::RegisterType::m_id
private

Definition at line 79 of file RegisterType.h.

Referenced by GetID(), and RegisterType().

◆ m_kind

const RegisterTypeKind lldb_private::RegisterType::m_kind
private

Definition at line 78 of file RegisterType.h.

Referenced by getKind(), and RegisterType().

◆ m_uid

const uint64_t lldb_private::RegisterType::m_uid
private

Definition at line 80 of file RegisterType.h.

Referenced by GetUID(), and RegisterType().


The documentation for this class was generated from the following files: