ida_bitrange
Definition of the bitrange_t class.
Classes
Module Contents
- class ida_bitrange.bitrange_t(bit_ofs: uint16 = 0, size_in_bits: uint16 = 0)
Bases:
object- thisown
- bitoff() uint
Get offset of 1st bit.
- bitsize() uint
Get size of the value in bits.
- bytesize() uint
Size of the value in bytes.
- mask64() uint64
Convert to mask of 64 bits.
- has_common(r: bitrange_t) bool
Does have common bits with another bitrange?
- apply_mask(subrange: bitrange_t) bool
Apply mask to a bitrange
- Parameters:
subrange – range inside the main bitrange to keep After this operation the main bitrange will be truncated to have only the bits that are specified by subrange. Example: [off=8,nbits=4], subrange[off=1,nbits=2] => [off=9,nbits=2]
- Returns:
success
- intersect(r: bitrange_t) None
Intersect two ranges.
- create_union(r: bitrange_t) None
Create union of 2 ranges including the hole between them.
- sub(r: bitrange_t) bool
Subtract a bitrange.
- compare(r: bitrange_t) int