Module index

Module ida_bitrange

IDA Plugin SDK API wrapper: bitrange

Classes

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

Methods

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