|
LLDB mainline
|
A GDB target-description union type. More...
#include <RegisterType.h>
Classes | |
| class | Field |
Public Member Functions | |
| RegisterTypeUnion (std::string id, std::vector< Field > fields) | |
| const std::vector< Field > & | GetFields () 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 | |
| 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 |
| 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 std::vector< Field > | m_fields |
Additional Inherited Members | |
| Public Types inherited from lldb_private::RegisterType | |
| enum | RegisterTypeKind { eRegisterTypeKindFlags , eRegisterTypeKindEnum , eRegisterTypeKindBuiltin , eRegisterTypeKindVector , eRegisterTypeKindUnion } |
A GDB target-description union type.
Each field is an alternative view of the same register data. Referenced field types must outlive the union.
Definition at line 138 of file RegisterType.h.
| RegisterTypeUnion::RegisterTypeUnion | ( | std::string | id, |
| std::vector< Field > | fields ) |
Definition at line 119 of file RegisterType.cpp.
References lldb_private::RegisterType::eRegisterTypeKindUnion, m_fields, lldb_private::RegisterType::RegisterType(), and lldb_private::RegisterType::SetDependencies().
|
inlinestatic |
Definition at line 163 of file RegisterType.h.
References lldb_private::RegisterType::eRegisterTypeKindUnion, lldb_private::RegisterType::getKind(), and lldb_private::RegisterType::RegisterType().
| void RegisterTypeUnion::DumpToLog | ( | Log * | log | ) | const |
Definition at line 165 of file RegisterType.cpp.
References lldb_private::RegisterType::GetID(), LLDB_LOG, and m_fields.
|
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 131 of file RegisterType.cpp.
References m_fields.
Referenced by IsByteSizeCompatible().
|
inline |
Definition at line 154 of file RegisterType.h.
References m_fields.
| bool RegisterTypeUnion::IsByteSizeCompatible | ( | uint64_t | byte_size | ) | const |
Definition at line 142 of file RegisterType.cpp.
References GetByteSize(), and m_fields.
|
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 174 of file RegisterType.cpp.
References lldb_private::RegisterType::GetID(), lldb_private::Stream::Indent(), lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), m_fields, lldb_private::RegisterType::PrintXMLAttributeValue(), and lldb_private::RegisterType::RegisterType().
|
private |
Definition at line 168 of file RegisterType.h.
Referenced by DumpToLog(), GetByteSize(), GetFields(), IsByteSizeCompatible(), RegisterTypeUnion(), and ToXMLElement().