|
dex++ 0.3.1
C++ and C API reference
|
One decoded instruction. More...
#include <dexpp.h>
Public Attributes | |
| DexppInstructionKind | kind |
| The instruction family. | |
| uint32_t | offset |
| Position in the method's code. | |
| uint8_t | opcode |
| The raw opcode byte. | |
| uint8_t | size |
| Length in code units (1 to 5). | |
| int32_t | branch_offset |
| Relative to the instruction's own offset. | |
| int32_t | payload_offset |
| Where the switch or array table is. | |
| uint8_t | reg |
| The single register operand. | |
| int | has_reg |
| RETURN: 0 for return-void. | |
| uint8_t | reg_a |
| IF: first register compared. | |
| uint8_t | reg_b |
| IF: second register compared. | |
| uint16_t | dest |
| The register written. | |
| uint16_t | src |
| The register read. | |
| int | has_src |
| MOVE: 0 for move-result and move-exception. | |
| uint8_t | src_a |
| COMPARE, BINARY_OP: first operand. | |
| uint8_t | src_b |
| COMPARE, BINARY_OP: second operand. | |
| int64_t | value |
| CONST: the constant (bit pattern for floats). | |
| int32_t | literal |
| BINARY_LIT: the constant operand. | |
| uint32_t | string_index |
| CONST_STRING. | |
| uint32_t | type_index |
| CONST_CLASS, TYPE, FILLED_NEW_ARRAY. | |
| uint32_t | method_handle_index |
| CONST_METHOD_HANDLE: index in the method handle table. | |
| uint32_t | proto_index |
| CONST_METHOD_TYPE, INVOKE_POLYMORPHIC: prototype index. | |
| uint32_t | field_index |
| FIELD. | |
| uint32_t | method_index |
| INVOKE, INVOKE_POLYMORPHIC. | |
| uint32_t | call_site_index |
| INVOKE_CUSTOM. | |
| uint8_t | value_reg |
| ARRAY_OP, FIELD: the value's register. | |
| uint8_t | array_reg |
| ARRAY_OP, ARRAY_LENGTH. | |
| uint8_t | index_reg |
| ARRAY_OP. | |
| uint8_t | object_reg |
| FIELD: the object's register. | |
| int | has_object_reg |
| FIELD: 0 for a static field. | |
| int | is_packed |
| SWITCH: 1 for packed-switch. | |
| int | is_enter |
| MONITOR: 1 for monitor-enter. | |
| int | is_write |
| ARRAY_OP, FIELD: 1 for a write. | |
| int | is_static |
| FIELD: 1 for a static field. | |
| DexppOperandWidth | width |
| RETURN, MOVE, CONST, ARRAY_OP, FIELD, BINARY_OP. | |
| DexppOperandWidth | src_width |
| COMPARE, UNARY_OP. | |
| DexppOperandWidth | dest_width |
| UNARY_OP. | |
| DexppSwitchCase * | cases |
| SWITCH: the decoded case table. | |
| size_t | case_count |
| SWITCH: number of cases. | |
| uint16_t * | arg_regs |
| FILLED_NEW_ARRAY, INVOKE, INVOKE_POLYMORPHIC, INVOKE_CUSTOM. | |
| size_t | arg_count |
| Number of argument registers. | |
One decoded instruction.
offset, opcode and size are set for every kind; the other members only for the kinds DexppInstructionKind lists for them, and are 0 or NULL otherwise. Offsets are in 16-bit code units. Pool indices (string_index, type_index, ...) are raw indices into the DEX file's tables; dexpp_method_calls() and the other reference functions give resolved names.
| DexppInstructionKind DexppInstruction::kind |
The instruction family.
| uint32_t DexppInstruction::offset |
Position in the method's code.
| uint8_t DexppInstruction::opcode |
The raw opcode byte.
| uint8_t DexppInstruction::size |
Length in code units (1 to 5).
| int32_t DexppInstruction::branch_offset |
Relative to the instruction's own offset.
| int32_t DexppInstruction::payload_offset |
Where the switch or array table is.
| uint8_t DexppInstruction::reg |
The single register operand.
| int DexppInstruction::has_reg |
RETURN: 0 for return-void.
| uint8_t DexppInstruction::reg_a |
IF: first register compared.
| uint8_t DexppInstruction::reg_b |
IF: second register compared.
| uint16_t DexppInstruction::dest |
The register written.
| uint16_t DexppInstruction::src |
The register read.
| int DexppInstruction::has_src |
MOVE: 0 for move-result and move-exception.
TYPE: 0 for check-cast and new-instance.
| uint8_t DexppInstruction::src_a |
COMPARE, BINARY_OP: first operand.
| uint8_t DexppInstruction::src_b |
COMPARE, BINARY_OP: second operand.
| int64_t DexppInstruction::value |
CONST: the constant (bit pattern for floats).
| int32_t DexppInstruction::literal |
BINARY_LIT: the constant operand.
| uint32_t DexppInstruction::string_index |
CONST_STRING.
| uint32_t DexppInstruction::type_index |
CONST_CLASS, TYPE, FILLED_NEW_ARRAY.
| uint32_t DexppInstruction::method_handle_index |
CONST_METHOD_HANDLE: index in the method handle table.
| uint32_t DexppInstruction::proto_index |
CONST_METHOD_TYPE, INVOKE_POLYMORPHIC: prototype index.
| uint32_t DexppInstruction::field_index |
FIELD.
| uint32_t DexppInstruction::method_index |
INVOKE, INVOKE_POLYMORPHIC.
| uint32_t DexppInstruction::call_site_index |
INVOKE_CUSTOM.
| uint8_t DexppInstruction::value_reg |
ARRAY_OP, FIELD: the value's register.
| uint8_t DexppInstruction::array_reg |
ARRAY_OP, ARRAY_LENGTH.
| uint8_t DexppInstruction::index_reg |
ARRAY_OP.
| uint8_t DexppInstruction::object_reg |
FIELD: the object's register.
| int DexppInstruction::has_object_reg |
FIELD: 0 for a static field.
| int DexppInstruction::is_packed |
SWITCH: 1 for packed-switch.
| int DexppInstruction::is_enter |
MONITOR: 1 for monitor-enter.
| int DexppInstruction::is_write |
ARRAY_OP, FIELD: 1 for a write.
| int DexppInstruction::is_static |
FIELD: 1 for a static field.
| DexppOperandWidth DexppInstruction::width |
RETURN, MOVE, CONST, ARRAY_OP, FIELD, BINARY_OP.
| DexppOperandWidth DexppInstruction::src_width |
COMPARE, UNARY_OP.
| DexppOperandWidth DexppInstruction::dest_width |
UNARY_OP.
| DexppSwitchCase* DexppInstruction::cases |
SWITCH: the decoded case table.
| size_t DexppInstruction::case_count |
SWITCH: number of cases.
| uint16_t* DexppInstruction::arg_regs |
FILLED_NEW_ARRAY, INVOKE, INVOKE_POLYMORPHIC, INVOKE_CUSTOM.
| size_t DexppInstruction::arg_count |
Number of argument registers.