RzReg#

class RzReg#
property allregs: RzList[RzRegItem]#
property arch: int#
property big_endian: bool#
property bits: int#
property is_thumb: bool#
property iters: int#
property name: Pointer[Pointer[int]]#
property profile: str#
property reg_profile: RzRegProfile#
property reg_profile_cmt: str#
property reg_profile_str: str#
property _regset: RzRegSet#
property roregs: RzList[char]#
property size: int#
static arena_free() None#

Calls function rz_reg_arena_free (defined in arena.c)

static arena_new() RzRegArena#

Calls function rz_reg_arena_new (defined in arena.c)

static cond_from_string() int#

Calls function rz_reg_cond_from_string (defined in rcond.c)

static cond_to_string() str#

Calls function rz_reg_cond_to_string (defined in rcond.c)

static filter_items_covered() RzList[RzRegItem]#

Calls function rz_reg_filter_items_covered (defined in reg.c)

Filter out all register items that are smaller than but covered entirely by some other register.

Parameters:

regs – list of RzRegItem

static get_name_idx() int#

Calls function rz_reg_get_name_idx (defined in reg.c)

static get_role() str#

Calls function rz_reg_get_role (defined in reg.c)

static get_type() str#

Calls function rz_reg_get_type (defined in reg.c)

static item_free() None#

Calls function rz_reg_item_free (defined in reg.c)

static new() RzReg#

Calls function rz_reg_new (defined in reg.c)

static parse_gdb_profile() str#

Calls function rz_reg_parse_gdb_profile (defined in profile.c)

static role_by_name() int#

Calls function rz_reg_role_by_name (defined in reg.c)

Get the RzRegisterId with the given name or -1.

static type_by_name() int#

Calls function rz_reg_type_by_name (defined in reg.c)

Returns the register type for the given type abbreviation.

Parameters:

str – The type abbreviation (gpr, flg, sys etc.)

Returns:

int The register type or -1 on failure.

arena_dup(source: int) int#

Calls function rz_reg_arena_dup (defined in arena.c)

arena_peek() int#

Calls function rz_reg_arena_peek (defined in arena.c)

arena_poke(buf: int) None#

Calls function rz_reg_arena_poke (defined in arena.c)

arena_pop() None#

Calls function rz_reg_arena_pop (defined in arena.c)

arena_push() int#

Calls function rz_reg_arena_push (defined in arena.c)

arena_set_bytes(str: str) int#

Calls function rz_reg_arena_set_bytes (defined in arena.c)

arena_shrink() None#

Calls function rz_reg_arena_shrink (defined in arena.c)

arena_swap(copy: int) None#

Calls function rz_reg_arena_swap (defined in arena.c)

arena_zero(type: RzRegisterType) None#

Calls function rz_reg_arena_zero (defined in arena.c)

cond(type: int) int#

Calls function rz_reg_cond (defined in rcond.c)

cond_apply(f: RzRegFlags) None#

Calls function rz_reg_cond_apply (defined in rcond.c)

cond_bits(type: int, f: RzRegFlags) int#

Calls function rz_reg_cond_bits (defined in rcond.c)

cond_bits_set(type: int, f: RzRegFlags, v: bool) bool#

Calls function rz_reg_cond_bits_set (defined in rcond.c)

cond_get(name: str) RzRegItem#

Calls function rz_reg_cond_get (defined in rcond.c)

cond_get_value(name: str) int#

Calls function rz_reg_cond_get_value (defined in rcond.c)

cond_retrieve(f: RzRegFlags) RzRegFlags#

Calls function rz_reg_cond_retrieve (defined in rcond.c)

cond_set(name: str, val: bool) bool#

Calls function rz_reg_cond_set (defined in rcond.c)

convert_32_to_64(rreg32: str) str#

Calls function rz_reg_32_to_64 (defined in reg.c)

convert_64_to_32(rreg64: str) str#

Calls function rz_reg_64_to_32 (defined in reg.c)

fit_arena() int#

Calls function rz_reg_fit_arena (defined in arena.c)

free() None#

Calls function rz_reg_free (defined in reg.c)

free_internal(init: bool) None#

Calls function rz_reg_free_internal (defined in reg.c)

get(name: str, type: int) RzRegItem#

Calls function rz_reg_get (defined in reg.c)

get_at(type: int, regsize: int, delta: int) RzRegItem#

Calls function rz_reg_get_at (defined in reg.c)

get_bv(item: RzRegItem) RzBitVector#

Calls function rz_reg_get_bv (defined in rvalue.c)

Read the value of the given register as a bit vector

get_bvalue(item: RzRegItem) str#

Calls function rz_reg_get_bvalue (defined in rvalue.c)

get_by_role(role: RzRegisterId) RzRegItem#

Calls function rz_reg_get_by_role (defined in reg.c)

get_by_role_or_name(name: str) RzRegItem#

Calls function rz_reg_get_by_role_or_name (defined in reg.c)

get_bytes(type: int, size: int) int#

Calls function rz_reg_get_bytes (defined in arena.c)

get_double(item: RzRegItem) float#

Calls function rz_reg_get_double (defined in double.c)

get_float(item: RzRegItem) float#

Calls function rz_reg_get_float (defined in double.c)

get_list(type: int) RzList[RzRegItem]#

Calls function rz_reg_get_list (defined in reg.c)

get_longdouble(item: RzRegItem) int#

Calls function rz_reg_get_longdouble (defined in double.c)

get_name(kind: int) str#

Calls function rz_reg_get_name (defined in reg.c)

get_name_by_type(name: str) str#

Calls function rz_reg_get_name_by_type (defined in reg.c)

get_pack(item: RzRegItem, packidx: int, packbits: int) int#

Calls function rz_reg_get_pack (defined in rvalue.c)

get_value(item: RzRegItem) int#

Calls function rz_reg_get_value (defined in rvalue.c)

get_value_big(item: RzRegItem, val: utX) int#

Calls function rz_reg_get_value_big (defined in rvalue.c)

get_value_by_role(role: RzRegisterId) int#

Calls function rz_reg_get_value_by_role (defined in rvalue.c)

getv(name: str) int#

Calls function rz_reg_getv (defined in reg.c)

getv_by_role_or_name(name: str) int#

Calls function rz_reg_getv_by_role_or_name (defined in reg.c)

index_get(idx: int) RzRegItem#

Calls function rz_reg_index_get (defined in reg.c)

is_readonly(item: RzRegItem) bool#

Calls function rz_reg_is_readonly (defined in reg.c)

next_diff(type: int, buf: int, buflen: int, prev_ri: RzRegItem, regsize: int) RzRegItem#

Calls function rz_reg_next_diff (defined in reg.c)

profile_to_cc() str#

Calls function rz_reg_profile_to_cc (defined in profile.c)

read_regs(buf: int, len: int) bool#

Calls function rz_reg_read_regs (defined in arena.c)

regset_get(type: int) RzRegSet#

Calls function rz_reg_regset_get (defined in reg.c)

reindex() None#

Calls function rz_reg_reindex (defined in reg.c)

set_bv(item: RzRegItem, bv: RzBitVector) bool#

Calls function rz_reg_set_bv (defined in rvalue.c)

Set the value of the given register from the given bit vector

Parameters:

bv – bitvector of exactly item->len bits

Returns:

wether the write succeeded

set_bvalue(item: RzRegItem, str: str) int#

Calls function rz_reg_set_bvalue (defined in rvalue.c)

set_bytes(type: int, buf: int, len: int) bool#

Calls function rz_reg_set_bytes (defined in arena.c)

set_double(item: RzRegItem, value: float) bool#

Calls function rz_reg_set_double (defined in double.c)

set_float(item: RzRegItem, value: float) bool#

Calls function rz_reg_set_float (defined in double.c)

set_longdouble(item: RzRegItem, value: int) bool#

Calls function rz_reg_set_longdouble (defined in double.c)

set_name(role: RzRegisterId, name: str) bool#

Calls function rz_reg_set_name (defined in reg.c)

set_pack(item: RzRegItem, packidx: int, packbits: int, val: int) int#

Calls function rz_reg_set_pack (defined in rvalue.c)

set_profile(profile: str) bool#

Calls function rz_reg_set_profile (defined in profile.c)

set_profile_string(profile: str) bool#

Calls function rz_reg_set_profile_string (defined in profile.c)

Parses a register profile string and sets up all registers accordingly in reg.

Parameters:
  • reg – The RzReg struct which should hold the register data.

  • profile – The register profile string.

Returns:

false On failure;

Returns:

true On success.

set_reg_profile() bool#

Calls function rz_reg_set_reg_profile (defined in profile.c)

Fills reg->regset with the definitions and alias of the register profile.

Parameters:

reg – The RzReg struct which holds the register profile and an empty reg->regset

Returns:

false On failure.

Returns:

true On success.

set_value(item: RzRegItem, value: int) bool#

Calls function rz_reg_set_value (defined in rvalue.c)

set_value_by_role(role: RzRegisterId, value: int) bool#

Calls function rz_reg_set_value_by_role (defined in rvalue.c)

setv(name: str, val: int) int#

Calls function rz_reg_setv (defined in reg.c)