|
LLDB mainline
|
#include <RegisterTypeFlags.h>
Classes | |
| class | Field |
Public Member Functions | |
| RegisterTypeFlags (std::string id, unsigned size, const std::vector< Field > &fields) | |
| This assumes that: | |
| void | SetFields (const std::vector< Field > &fields) |
| Replace all the fields with the new set of fields. | |
| std::string | DumpEnums (uint32_t max_width) const |
| Make a string where each line contains the name of a field that has enum values, and lists what those values are. | |
| template<typename T> | |
| T | ReverseFieldOrder (T value) const |
| const std::vector< Field > & | GetFields () const |
| unsigned | GetSize () const |
| void | DumpToLog (Log *log) const |
| std::string | AsTable (uint32_t max_width) const |
| Produce a text table showing the layout of all the fields. | |
| virtual 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) | |
| void | ToXML (Stream &strm, std::unordered_set< const RegisterType * > &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 |
| void | SetDependencies (std::vector< const RegisterType * > dependencies) |
Static Public Member Functions | |
| static bool | classof (const RegisterType *register_type) |
Private Attributes | |
| const unsigned | m_size |
| Size in bytes. | |
| std::vector< Field > | m_fields |
Additional Inherited Members | |
| Public Types inherited from lldb_private::RegisterType | |
| enum | RegisterTypeKind { eRegisterTypeKindFlags , eRegisterTypeKindEnum } |
Definition at line 62 of file RegisterTypeFlags.h.
| RegisterTypeFlags::RegisterTypeFlags | ( | std::string | id, |
| unsigned | size, | ||
| const std::vector< Field > & | fields ) |
This assumes that:
Definition at line 158 of file RegisterTypeFlags.cpp.
| std::string RegisterTypeFlags::AsTable | ( | uint32_t | max_width | ) | const |
Produce a text table showing the layout of all the fields.
Unnamed/padding fields will be included, with only their positions shown. max_width will be the width in characters of the terminal you are going to print the table to. If the table would exceed this width, it will be split into many tables as needed.
Definition at line 197 of file RegisterTypeFlags.cpp.
References EmitTable(), FormatCell(), lldb_private::StreamString::GetString(), m_fields, and lldb_private::Stream::Printf().
|
inlinestatic |
Definition at line 180 of file RegisterTypeFlags.h.
References lldb_private::RegisterType::eRegisterTypeKindFlags, lldb_private::RegisterType::getKind(), and lldb_private::RegisterType::RegisterType().
| std::string RegisterTypeFlags::DumpEnums | ( | uint32_t | max_width | ) | const |
Make a string where each line contains the name of a field that has enum values, and lists what those values are.
Definition at line 297 of file RegisterTypeFlags.cpp.
References DumpEnumerators(), lldb_private::StreamString::GetString(), and m_fields.
| void RegisterTypeFlags::DumpToLog | ( | Log * | log | ) | const |
Definition at line 164 of file RegisterTypeFlags.cpp.
|
inline |
Definition at line 165 of file RegisterTypeFlags.h.
References m_fields.
Referenced by lldb_private::RegisterTypeBuilderClang::BuildFlagsType(), and ReverseFieldOrder().
|
inline |
Definition at line 166 of file RegisterTypeFlags.h.
References m_size.
Referenced by lldb_private::RegisterTypeBuilderClang::BuildFlagsType(), and ToXMLElement().
|
inline |
Definition at line 154 of file RegisterTypeFlags.h.
References GetFields().
Referenced by dump_type_value().
| void RegisterTypeFlags::SetFields | ( | const std::vector< Field > & | fields | ) |
Replace all the fields with the new set of fields.
All the assumptions and checks apply as when you use the constructor. Intended to only be used when runtime field detection is needed.
Definition at line 113 of file RegisterTypeFlags.cpp.
|
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 384 of file RegisterTypeFlags.cpp.
References lldb_private::RegisterType::GetID(), GetSize(), lldb_private::Stream::Indent(), lldb_private::Stream::IndentLess(), lldb_private::Stream::IndentMore(), m_fields, lldb_private::Stream::Printf(), lldb_private::Stream::PutChar(), and lldb_private::RegisterType::RegisterType().
|
private |
Definition at line 187 of file RegisterTypeFlags.h.
Referenced by AsTable(), DumpEnums(), DumpToLog(), GetFields(), and ToXMLElement().
|
private |
Size in bytes.
Definition at line 186 of file RegisterTypeFlags.h.
Referenced by DumpToLog(), and GetSize().