9#ifndef LLDB_TARGET_REGISTERFLAGS_H
10#define LLDB_TARGET_REGISTERFLAGS_H
27 Field(std::string name,
unsigned start,
unsigned end);
30 Field(std::string name,
unsigned bit_position)
42 uint64_t
GetValue(uint64_t register_value)
const {
85 const std::vector<Field> &fields);
90 void SetFields(
const std::vector<Field> &fields);
102 ret |= field.GetValue(value) << shift;
103 shift += field.GetSizeInBits();
119 std::string
AsTable(uint32_t max_width)
const;
uint64_t GetMask() const
A mask that covers all bits of the field.
bool Overlaps(const Field &other) const
unsigned GetSizeInBits() const
Get size of the field in bits. Will always be at least 1.
uint64_t GetValue(uint64_t register_value) const
Extract value of the field from a whole register value.
unsigned PaddingDistance(const Field &other) const
Return the number of bits between this field and the other, that are not covered by either field.
bool operator==(const Field &rhs) const
Field(std::string name, unsigned bit_position)
Construct a field that occupies a single bit.
const std::string & GetName() const
unsigned GetStart() const
bool operator<(const Field &rhs) const
void ToXML(StreamString &strm) const
Output XML that describes this field, to be inserted into a target XML file.
unsigned m_start
Start/end bit positions.
std::vector< Field > m_fields
T ReverseFieldOrder(T value) const
const std::vector< Field > & GetFields() const
void SetFields(const std::vector< Field > &fields)
Replace all the fields with the new set of fields.
const unsigned m_size
Size in bytes.
const std::string & GetID() const
std::string AsTable(uint32_t max_width) const
Produce a text table showing the layout of all the fields.
void ToXML(StreamString &strm) const
A class that represents a running process on the host machine.