|
decompiler 1.0.0
|
A field within a structure that is not aligned or sized on byte boundaries. More...
#include <type.hh>
Public Member Functions | |
| TypeBitField (Decoder &decoder, TypeFactory &typegrp) | |
| Restore this bitfield from a stream. | |
| TypeBitField (int4 id, int4 numBits, bool isBigEndian, const string &nm, Datatype *ct) | |
| Construct from components. | |
| int4 | compare (const TypeBitField &op2) const |
| Compare definition of this with another TypeBitField for propagation ordering. | |
| int4 | compareDependency (const TypeBitField &op2) const |
| Compare this with another TypeBitField for functional equivalence. | |
| void | encode (Encoder &encoder) const |
| Encode this bitfield to a stream. | |
Static Public Member Functions | |
| static bool | compareMaxByte (int4 off, const TypeBitField &bitfield) |
Public Attributes | |
| string | name |
| Name of bitfield. | |
| Datatype * | type |
| Underlying (integer) data-type. | |
| BitRange | bits |
| Description of the bitfield within its structure. | |
| int4 | ident |
| Identifier of this within containing structure. | |
A field within a structure that is not aligned or sized on byte boundaries.
| ghidra::TypeBitField::TypeBitField | ( | int4 | id, |
| int4 | numBits, | ||
| bool | isBigEndian, | ||
| const string & | nm, | ||
| Datatype * | ct | ||
| ) |
Construct from components.
Create the bitfield only knowing the number of bits and the position of the field within the declaration. The bit offset and byte offset must be calculated later via TypeStruct::assignFieldOffsets
| id | is the position of the bitfield within the declaration, where contiguous bitfields share the same position |
| numBits | is the number of bits in the bitfield |
| isBigEndian | is true if the bitfield is stored in a big endian container |
| nm | is the name of the bitfield |
| ct | is the integer data-type associated with the bitfield |
| int4 ghidra::TypeBitField::compare | ( | const TypeBitField & | op2 | ) | const |
Compare definition of this with another TypeBitField for propagation ordering.
Compare meta-data of the two bit-fields for use with TypeStruct::compare
| op2 | is the other TypeBitField to compare with this |
References bits, ghidra::BitRange::compare(), ghidra::Datatype::getMetatype(), name, and type.
| int4 ghidra::TypeBitField::compareDependency | ( | const TypeBitField & | op2 | ) | const |
Compare this with another TypeBitField for functional equivalence.
Compare structure of the two bit-fields for use with TypeStruct::compareDependency.
| op2 | is the other TypeBitField to compare with this |
References bits, ghidra::BitRange::compare(), name, and type.
|
inlinestatic |
< Compare byte container end-point to the given offset
References bits, ghidra::BitRange::byteOffset, and ghidra::BitRange::byteSize.
Referenced by ghidra::TypeStruct::collectBitFields(), and ghidra::TypeStruct::hasBitFieldsInRange().