|
IDA C++ SDK 9.2
|
Information about a switch statement. More...
#include <nalt.hpp>
Public Types | |
| enum | { SWITCH_INFO_VERSION = 2 } |
Public Member Functions | |
| int | get_shift (void) const |
| See #SWI_SHIFT_MASK. | |
| void | set_shift (int shift) |
| See #SWI_SHIFT_MASK. | |
| int | get_jtable_element_size (void) const |
| void | set_jtable_element_size (int size) |
| int | get_vtable_element_size (void) const |
| void | set_vtable_element_size (int size) |
| bool | has_default (void) const |
| bool | has_elbase (void) const |
| bool | is_sparse (void) const |
| bool | is_custom (void) const |
| bool | is_indirect (void) const |
| bool | is_subtract (void) const |
| bool | is_nolowcase (void) const |
| bool | use_std_table (void) const |
| bool | is_user_defined () const |
| sval_t | get_lowcase (void) const |
| int | get_jtable_size (void) const |
| void | set_jtable_size (int size) |
| void | set_elbase (ea_t base) |
| void | set_expr (int r, op_dtype_t dt) |
| bool | get_jrange_vrange (range_t *jrange=nullptr, range_t *vrange=nullptr) const |
| get separate parts of the switch | |
| int | get_version () const |
| switch_info_t () | |
| void | clear () |
Public Attributes | |
| uint32 | flags |
| Switch info flags | |
| ushort | ncases = 0 |
| number of cases (excluding default) | |
| ea_t | jumps = BADADDR |
| jump table start address | |
| union { | |
| ea_t values | |
| values table address (if #SWI_SPARSE is set) More... | |
| uval_t lowcase | |
| the lowest value in cases More... | |
| }; | |
| ea_t | defjump = BADADDR |
| default jump address (#BADADDR if no default case) | |
| ea_t | startea = BADADDR |
| start of the switch idiom | |
| int | jcases = 0 |
| number of entries in the jump table (SWI_INDIRECT) | |
| sval_t | ind_lowcase = 0 |
| ea_t | elbase = 0 |
| element base | |
| int | regnum = -1 |
| the switch expression as a value of the REGNUM register before the instruction at EXPR_EA. | |
| op_dtype_t | regdtype = 0 |
| size of the switch expression register as dtype | |
| uval_t | custom = 0 |
| information for custom tables (filled and used by modules) | |
| int | version = SWITCH_INFO_VERSION |
| ea_t | expr_ea = BADADDR |
| the address before that the switch expression is in REGNUM. | |
| eavec_t | marks |
| the insns marked as IM_SWITCH. They are used to delete the switch. | |
Information about a switch statement.
|
inline |
|
inline |
See #SWI_SHIFT_MASK.
possible answers: 0..3.
|
inline |
See #SWI_SHIFT_MASK.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
get separate parts of the switch
|
inline |
|
inline |
| uint32 switch_info_t::flags |
| ushort switch_info_t::ncases = 0 |
number of cases (excluding default)
| ea_t switch_info_t::jumps = BADADDR |
jump table start address
| ea_t switch_info_t::values |
values table address (if #SWI_SPARSE is set)
| uval_t switch_info_t::lowcase |
the lowest value in cases
| union { ... } switch_info_t |
| ea_t switch_info_t::defjump = BADADDR |
default jump address (#BADADDR if no default case)
| ea_t switch_info_t::startea = BADADDR |
start of the switch idiom
| int switch_info_t::jcases = 0 |
number of entries in the jump table (SWI_INDIRECT)
| sval_t switch_info_t::ind_lowcase = 0 |
| ea_t switch_info_t::elbase = 0 |
element base
| int switch_info_t::regnum = -1 |
the switch expression as a value of the REGNUM register before the instruction at EXPR_EA.
-1 means 'unknown'
| op_dtype_t switch_info_t::regdtype = 0 |
size of the switch expression register as dtype
| uval_t switch_info_t::custom = 0 |
information for custom tables (filled and used by modules)
| int switch_info_t::version = SWITCH_INFO_VERSION |
| ea_t switch_info_t::expr_ea = BADADDR |
the address before that the switch expression is in REGNUM.
If BADADDR, then the first insn marked as IM_SWITCH after STARTEA is used.
| eavec_t switch_info_t::marks |
the insns marked as IM_SWITCH. They are used to delete the switch.