LLDB mainline
lldb_private::RegisterTypeBuiltin Class Reference

A predefined GDB target-description type. More...

#include <RegisterType.h>

Inheritance diagram for lldb_private::RegisterTypeBuiltin:
[legend]

Public Member Functions

 RegisterTypeBuiltin (std::string id, lldb::Encoding encoding, lldb::Format format, std::optional< uint64_t > byte_size)
 A missing byte size means the size depends on the target.
lldb::Encoding GetEncoding () const
lldb::Format GetFormat () const
std::optional< uint64_t > GetByteSize () const override
 Return this type's fixed size in bytes, if it has one.
void ToXML (Stream &strm, std::unordered_set< std::string > &previously_emitted, const RegisterType *user=nullptr) const override
 Output XML that describes this type, to be inserted into a target XML file.
void ToXMLElement (Stream &strm, const RegisterType *user=nullptr) const override
 Output the register type as an XML element.
Public Member Functions inherited from lldb_private::RegisterType
RegisterTypeKind getKind () const
 RegisterType (RegisterTypeKind kind, std::string id)
 RegisterType (const RegisterType &)=delete
RegisterTypeoperator= (const RegisterType &)=delete
 RegisterType (RegisterType &&)=delete
RegisterTypeoperator= (RegisterType &&)=delete
virtual ~RegisterType ()=default
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.
void SetDependencies (std::vector< const RegisterType * > dependencies)

Static Public Member Functions

static bool classof (const RegisterType *type)
Static Public Member Functions inherited from lldb_private::RegisterType
static void PrintXMLAttributeValue (Stream &strm, llvm::StringRef value)
 Print a string escaped for use as an XML attribute value.

Private Attributes

const lldb::Encoding m_encoding
const lldb::Format m_format
const std::optional< uint64_t > m_byte_size

Additional Inherited Members

Public Types inherited from lldb_private::RegisterType
enum  RegisterTypeKind { eRegisterTypeKindFlags , eRegisterTypeKindEnum , eRegisterTypeKindBuiltin , eRegisterTypeKindVector }

Detailed Description

A predefined GDB target-description type.

Builtin types are referenced by name and are not emitted as XML definitions.

Definition at line 85 of file RegisterType.h.

Constructor & Destructor Documentation

◆ RegisterTypeBuiltin()

RegisterTypeBuiltin::RegisterTypeBuiltin ( std::string id,
lldb::Encoding encoding,
lldb::Format format,
std::optional< uint64_t > byte_size )

A missing byte size means the size depends on the target.

Definition at line 52 of file RegisterType.cpp.

References lldb_private::RegisterType::eRegisterTypeKindBuiltin, m_byte_size, m_encoding, m_format, and lldb_private::RegisterType::RegisterType().

Member Function Documentation

◆ classof()

bool lldb_private::RegisterTypeBuiltin::classof ( const RegisterType * type)
inlinestatic

◆ GetByteSize()

std::optional< uint64_t > lldb_private::RegisterTypeBuiltin::GetByteSize ( ) const
inlineoverridevirtual

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

No byte size means it depends on the target.

Reimplemented from lldb_private::RegisterType.

Definition at line 93 of file RegisterType.h.

References m_byte_size.

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

◆ GetEncoding()

lldb::Encoding lldb_private::RegisterTypeBuiltin::GetEncoding ( ) const
inline

Definition at line 91 of file RegisterType.h.

References m_encoding.

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

◆ GetFormat()

lldb::Format lldb_private::RegisterTypeBuiltin::GetFormat ( ) const
inline

Definition at line 92 of file RegisterType.h.

References m_format.

◆ ToXML()

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

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 from lldb_private::RegisterType.

Definition at line 59 of file RegisterType.cpp.

References lldb_private::RegisterType::RegisterType().

◆ ToXMLElement()

void RegisterTypeBuiltin::ToXMLElement ( Stream & strm,
const RegisterType * user = nullptr ) const
overridevirtual

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.

Implements lldb_private::RegisterType.

Definition at line 62 of file RegisterType.cpp.

References lldb_private::RegisterType::RegisterType().

Member Data Documentation

◆ m_byte_size

const std::optional<uint64_t> lldb_private::RegisterTypeBuiltin::m_byte_size
private

Definition at line 107 of file RegisterType.h.

Referenced by GetByteSize(), and RegisterTypeBuiltin().

◆ m_encoding

const lldb::Encoding lldb_private::RegisterTypeBuiltin::m_encoding
private

Definition at line 105 of file RegisterType.h.

Referenced by GetEncoding(), and RegisterTypeBuiltin().

◆ m_format

const lldb::Format lldb_private::RegisterTypeBuiltin::m_format
private

Definition at line 106 of file RegisterType.h.

Referenced by GetFormat(), and RegisterTypeBuiltin().


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