Module index

Module ida_bitrange

Definition of the bitrange_t class.


class bitrange_t (*args)
Proxy of C++ bitrange_t class.
__init__(self, bit_ofs=0, size_in_bits=0) -> bitrange_t
bit_ofs: uint16
size_in_bits: uint16


def apply_mask(self, *args) ‑> bool
apply_mask(self, subrange) -> bool
Apply mask to a bitrange
subrange: (C++: const bitrange_t &) 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]
return: success
def bitoff(self, *args) ‑> uint
bitoff(self) -> uint
Get offset of 1st bit.
def bitsize(self, *args) ‑> uint
bitsize(self) -> uint
Get size of the value in bits.
def bytesize(self, *args) ‑> uint
bytesize(self) -> uint
Size of the value in bytes.
def compare(self, *args) ‑> int
compare(self, r) -> int
r: bitrange_t const &
def create_union(self, *args) ‑> void
create_union(self, r)
Create union of 2 ranges including the hole between them.
r: (C++: const bitrange_t &) bitrange_t const &
def empty(self, *args) ‑> bool
empty(self) -> bool
Is the bitrange empty?
def extract(self, *args) ‑> bool
extract(self, src, is_mf) -> bool
src: void const *
is_mf: bool
def has_common(self, *args) ‑> bool
has_common(self, r) -> bool
Does have common bits with another bitrange?
r: (C++: const bitrange_t &) bitrange_t const &
def init(self, *args) ‑> void
init(self, bit_ofs, size_in_bits)
Initialize offset and size to given values.
bit_ofs: (C++: uint16)
size_in_bits: (C++: uint16)
def inject(self, *args) ‑> bool
inject(self, dst, src, is_mf) -> bool
dst: void *
src: bytevec_t const &
is_mf: bool
def intersect(self, *args) ‑> void
intersect(self, r)
Intersect two ranges.
r: (C++: const bitrange_t &) bitrange_t const &
def mask64(self, *args) ‑> uint64
mask64(self) -> uint64
Convert to mask of 64 bits.
def reset(self, *args) ‑> void
Make the bitrange empty.
def shift_down(self, *args) ‑> void
shift_down(self, cnt)
Shift range down (left)
cnt: (C++: uint)
def shift_up(self, *args) ‑> void
shift_up(self, cnt)
Shift range up (right)
cnt: (C++: uint)
def sub(self, *args) ‑> bool
sub(self, r) -> bool
Subtract a bitrange.
r: (C++: const bitrange_t &) bitrange_t const &