9#ifndef LLDB_TARGET_REGISTERFLAGS_H
10#define LLDB_TARGET_REGISTERFLAGS_H
16#include "llvm/ADT/StringSet.h"
65 Field(std::string name,
unsigned start,
unsigned end);
68 Field(std::string name,
unsigned start,
unsigned end,
72 Field(std::string name,
unsigned bit_position);
87 static uint64_t
GetMaxValue(
unsigned start,
unsigned end);
90 uint64_t
GetValue(uint64_t register_value)
const {
137 const std::vector<Field> &fields);
142 void SetFields(
const std::vector<Field> &fields);
146 std::string
DumpEnums(uint32_t max_width)
const;
158 ret |= field.GetValue(value) << shift;
159 shift += field.GetSizeInBits();
175 std::string
AsTable(uint32_t max_width)
const;
Enumerators m_enumerators
std::vector< Enumerator > Enumerators
const Enumerators & GetEnumerators() const
const std::string & GetID() const
void DumpToLog(Log *log) const
void ToXML(Stream &strm, unsigned size) const
bool Overlaps(const Field &other) const
const FieldEnum * m_enum_type
uint64_t GetValue(uint64_t register_value) const
Extract value of the field from a whole register value.
uint64_t GetMask() const
A mask that covers all bits of the field.
unsigned PaddingDistance(const Field &other) const
Return the number of bits between this field and the other, that are not covered by either field.
const FieldEnum * GetEnum() const
bool operator==(const Field &rhs) const
const std::string & GetName() const
uint64_t GetMaxValue() const
The maximum unsigned value that could be contained in this field.
unsigned GetStart() const
void DumpToLog(Log *log) const
bool operator<(const Field &rhs) const
unsigned GetSizeInBits() const
Get size of the field in bits. Will always be at least 1.
unsigned m_start
Start/end bit positions.
void ToXML(Stream &strm) const
Output XML that describes this field, to be inserted into a target XML file.
std::vector< Field > m_fields
T ReverseFieldOrder(T value) const
const std::vector< Field > & GetFields() const
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...
void SetFields(const std::vector< Field > &fields)
Replace all the fields with the new set of fields.
const unsigned m_size
Size in bytes.
void DumpToLog(Log *log) const
void EnumsToXML(Stream &strm, llvm::StringSet<> &seen) const
Enum types must be defined before use, and GDBRemoteCommunicationServerLLGS view of the register type...
const std::string & GetID() const
void ToXML(Stream &strm) const
Output XML that describes this set of flags.
std::string AsTable(uint32_t max_width) const
Produce a text table showing the layout of all the fields.
A stream class that can stream formatted output to a file.
A class that represents a running process on the host machine.
void ToXML(Stream &strm) const
Enumerator(uint64_t value, std::string name)
void DumpToLog(Log *log) const