LLDB mainline
lldb_private::RegisterTypeVector Class Reference

A GDB target-description vector type. The element type must outlive it. More...

#include <RegisterType.h>

Inheritance diagram for lldb_private::RegisterTypeVector:
[legend]

Public Member Functions

 RegisterTypeVector (std::string id, const RegisterType *element_type, uint32_t count)
const RegisterTypeGetElementType () const
uint32_t GetCount () const
std::optional< uint64_t > GetByteSize () const override
 Return this type's fixed size in bytes, if it has one.
bool IsByteSizeCompatible (uint64_t byte_size) const
void DumpToLog (Log *log) const
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 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
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 RegisterTypem_element_type
const uint32_t m_count

Additional Inherited Members

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

Detailed Description

A GDB target-description vector type. The element type must outlive it.

Definition at line 111 of file RegisterType.h.

Constructor & Destructor Documentation

◆ RegisterTypeVector()

RegisterTypeVector::RegisterTypeVector ( std::string id,
const RegisterType * element_type,
uint32_t count )

Member Function Documentation

◆ classof()

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

◆ DumpToLog()

void RegisterTypeVector::DumpToLog ( Log * log) const

◆ GetByteSize()

std::optional< uint64_t > RegisterTypeVector::GetByteSize ( ) const
overridevirtual

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 74 of file RegisterType.cpp.

References m_count, and m_element_type.

◆ GetCount()

uint32_t lldb_private::RegisterTypeVector::GetCount ( ) const
inline

Definition at line 117 of file RegisterType.h.

References m_count.

◆ GetElementType()

const RegisterType * lldb_private::RegisterTypeVector::GetElementType ( ) const
inline

Definition at line 116 of file RegisterType.h.

References m_element_type, and lldb_private::RegisterType::RegisterType().

◆ IsByteSizeCompatible()

bool RegisterTypeVector::IsByteSizeCompatible ( uint64_t byte_size) const

Definition at line 82 of file RegisterType.cpp.

References m_count, and m_element_type.

◆ ToXMLElement()

void RegisterTypeVector::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 99 of file RegisterType.cpp.

References lldb_private::RegisterType::GetID(), lldb_private::Stream::Indent(), m_count, m_element_type, lldb_private::Stream::Printf(), lldb_private::RegisterType::PrintXMLAttributeValue(), and lldb_private::RegisterType::RegisterType().

Member Data Documentation

◆ m_count

const uint32_t lldb_private::RegisterTypeVector::m_count
private

◆ m_element_type

const RegisterType* lldb_private::RegisterTypeVector::m_element_type
private

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