9#ifndef LLDB_UTILITY_REGISTERTYPE_H
10#define LLDB_UTILITY_REGISTERTYPE_H
13#include "llvm/ADT/StringRef.h"
18#include <unordered_set>
47 std::unordered_set<std::string> &previously_emitted,
70 virtual std::optional<uint64_t>
GetByteSize()
const {
return std::nullopt; }
95 void ToXML(
Stream &strm, std::unordered_set<std::string> &previously_emitted,
118 std::optional<uint64_t>
GetByteSize()
const override;
void ToXMLElement(Stream &strm, const RegisterType *user=nullptr) const override
Output the register type as an XML element.
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.
static bool classof(const RegisterType *type)
lldb::Encoding GetEncoding() const
const lldb::Encoding m_encoding
const lldb::Format m_format
const std::optional< uint64_t > m_byte_size
lldb::Format GetFormat() const
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.
std::optional< uint64_t > GetByteSize() const override
Return this type's fixed size in bytes, if it has one.
RegisterTypeVector(std::string id, const RegisterType *element_type, uint32_t count)
const RegisterType * GetElementType() const
uint32_t GetCount() const
void DumpToLog(Log *log) const
bool IsByteSizeCompatible(uint64_t byte_size) const
void ToXMLElement(Stream &strm, const RegisterType *user=nullptr) const override
Output the register type as an XML element.
std::optional< uint64_t > GetByteSize() const override
Return this type's fixed size in bytes, if it has one.
static bool classof(const RegisterType *type)
const RegisterType * m_element_type
RegisterType(RegisterTypeKind kind, std::string id)
RegisterType(const RegisterType &)=delete
virtual ~RegisterType()=default
RegisterTypeKind getKind() const
virtual std::optional< uint64_t > GetByteSize() const
Return this type's fixed size in bytes, if it has one.
virtual void ToXMLElement(Stream &strm, const RegisterType *user=nullptr) const =0
Output the register type as an XML element.
const std::string & GetID() const
RegisterType(RegisterType &&)=delete
const RegisterTypeKind m_kind
std::vector< const RegisterType * > m_dependencies
void SetDependencies(std::vector< const RegisterType * > dependencies)
RegisterType & operator=(RegisterType &&)=delete
static void PrintXMLAttributeValue(Stream &strm, llvm::StringRef value)
Print a string escaped for use as an XML attribute value.
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.
@ eRegisterTypeKindBuiltin
@ eRegisterTypeKindVector
uint64_t GetUID() const
Return an identifier unique among all RegisterType instances constructed during the lifetime of the L...
RegisterType & operator=(const RegisterType &)=delete
A stream class that can stream formatted output to a file.
A class that represents a running process on the host machine.
Format
Display format definitions.
Encoding
Register encoding definitions.