Module ida_segregs
If your processor doesn't use segment registers, then these functions are of no use for you. However, you should define two virtual segment registers - CS and DS (for code segment and data segment) and specify their internal numbers in the LPH structure (processor_t::reg_code_sreg and processor_t::reg_data_sreg).
Global Variables
R_cs
R_ds
R_es
R_fs
R_gs
R_ss
SR_auto
SR_autostart
SR_inherit
SR_user
Functions
copy_sreg_ranges(dst_rg: int, src_rg: int, map_selector: bool = False) ‑> void
copy_sreg_ranges(dst_rg, src_rg, map_selector=False) Duplicate segment register ranges.
del_sreg_range(ea: ea_t, rg: int) ‑> bool
del_sreg_range(ea, rg) -> bool Delete segment register range started at ea. When a segment register range is deleted, the previous range is extended to cover the empty space. The segment register range at the beginning of a segment cannot be deleted.
get_prev_sreg_range(out: sreg_range_t, ea: ea_t, rg: int) ‑> bool
get_prev_sreg_range(out, ea, rg) -> bool Get segment register range previous to one with address. note: more efficient then get_sreg_range(reg, ea-1)
get_sreg(ea: ea_t, rg: int) ‑> sel_t
get_sreg(ea, rg) -> sel_t Get value of a segment register. This function uses segment register range and default segment register values stored in the segment structure.
get_sreg_range(out: sreg_range_t, ea: ea_t, rg: int) ‑> bool
get_sreg_range(out, ea, rg) -> bool Get segment register range by linear address.
get_sreg_range_num(ea: ea_t, rg: int) ‑> int
get_sreg_range_num(ea, rg) -> int Get number of segment register range by address.
get_sreg_ranges_qty(rg: int) ‑> size_t
get_sreg_ranges_qty(rg) -> size_t Get number of segment register ranges.
getn_sreg_range(out: sreg_range_t, rg: int, n: int) ‑> bool
getn_sreg_range(out, rg, n) -> bool Get segment register range by its number.
set_default_dataseg(ds_sel: sel_t) ‑> void
set_default_dataseg(ds_sel) Set default value of DS register for all segments.
set_default_sreg_value(sg: segment_t *, rg: int, value: sel_t) ‑> bool
set_default_sreg_value(sg, rg, value) -> bool Set default value of a segment register for a segment.
set_sreg_at_next_code(ea1: ea_t, ea2: ea_t, rg: int, value: sel_t) ‑> void
set_sreg_at_next_code(ea1, ea2, rg, value) Set the segment register value at the next instruction. This function is designed to be called from idb_event::sgr_changed handler in order to contain the effect of changing a segment register value only until the next instruction.
It is useful, for example, in the ARM module: the modification of the T register does not affect existing instructions later in the code.
split_sreg_range(ea: ea_t, rg: int, v: sel_t, tag: uchar, silent: bool = False) ‑> bool
split_sreg_range(ea, rg, v, tag, silent=False) -> bool Create a new segment register range. This function is used when the IDP emulator detects that a segment register changes its value.
Classes
sreg_range_t()
: Proxy of C++ sreg_range_t class.
Ancestors (in MRO)
Instance variables
tag: uchar
tag
val: sel_t
val
Last updated