#include <jvmti_dasm.h>
Public Types | |
enum | Type { OPCODEERROR = 0, UNKNOWN, OTHER = UNKNOWN, RELATIVE_JUMP, RELATIVE_COND_JUMP, RELATIVE_CALL, INDIRECT_JUMP, INDIRECT_CALL, RET } |
Type of instruction. More... | |
enum | Register { DISASM_REG_NONE } |
General-purpose registers set. More... | |
enum | Kind { Kind_Imm, Kind_Mem, Kind_Reg } |
Kind of operand. More... | |
enum | CondJumpType { JUMP_OVERFLOW = 0, JUMP_NOT_OVERFLOW = 1, JUMP_BELOW = 2, JUMP_NOT_ABOVE_OR_EQUAL = JUMP_BELOW, JUMP_CARRY = JUMP_BELOW, JUMP_NOT_BELOW = 3, JUMP_ABOVE_OR_EQUAL = JUMP_NOT_BELOW, JUMP_NOT_CARRY = JUMP_NOT_BELOW, JUMP_ZERO = 4, JUMP_EQUAL = JUMP_ZERO, JUMP_NOT_ZERO = 5, JUMP_NOT_EQUAL = JUMP_NOT_ZERO, JUMP_BELOW_OR_EQUAL = 6, JUMP_NOT_ABOVE = JUMP_BELOW_OR_EQUAL, JUMP_NOT_BELOW_OR_EQUAL = 7, JUMP_ABOVE = JUMP_NOT_BELOW_OR_EQUAL, JUMP_SIGN = 8, JUMP_NOT_SIGN = 9, JUMP_PARITY = 10, JUMP_PARITY_EVEN = JUMP_PARITY, JUMP_NOT_PARITY = 11, JUMP_PARITY_ODD = JUMP_NOT_PARITY, JUMP_LESS = 12, JUMP_NOT_GREATER_OR_EQUAL = JUMP_LESS, JUMP_NOT_LESS = 13, JUMP_GREATER_OR_EQUAL = JUMP_NOT_LESS, JUMP_LESS_OR_EQUAL = 14, JUMP_NOT_GREATER = JUMP_LESS_OR_EQUAL, JUMP_NOT_LESS_OR_EQUAL = 15, JUMP_GREATER = JUMP_NOT_LESS_OR_EQUAL, CondJumpType_Count = 16 } |
Enum of possible condtions for conditional jump-s. More... | |
Public Member Functions | |
InstructionDisassembler (void) | |
InstructionDisassembler (NativeCodePtr address) | |
InstructionDisassembler (InstructionDisassembler &d) | |
Type | get_type (void) const |
Returns type of underlying instruction. | |
jint | get_length_with_prefix (void) const |
Returns length (in bytes) of underlying instruction. | |
NativeCodePtr | get_jump_target_address (void) const |
Returns absolute address of target, if applicable. | |
CondJumpType | get_cond_jump_type (void) const |
Returns type of conditional jump. | |
unsigned | get_operands_count (void) const |
Returns number of operands of the instruction. | |
const Opnd & | get_opnd (unsigned i) const |
Returns i-th operand. | |
NativeCodePtr | get_target_address_from_context (const Registers *pregs) const |
Calculates and returns address of target basing on the decoded arguments and provided register context. | |
const char * | get_reg_value (Register reg, const Registers *pcontext) const |
Returns the appropriate register value for the register operand reg. | |
Classes | |
struct | Opnd |
Describes an argument of instruction. More... |
Enum of possible condtions for conditional jump-s.
InstructionDisassembler.InstructionDisassembler | ( | void | ) |
InstructionDisassembler.InstructionDisassembler | ( | NativeCodePtr | address | ) |
InstructionDisassembler.InstructionDisassembler | ( | InstructionDisassembler & | d | ) |
Type InstructionDisassembler.get_type | ( | void | ) | const |
Returns type of underlying instruction.
jint InstructionDisassembler.get_length_with_prefix | ( | void | ) | const |
Returns length (in bytes) of underlying instruction.
The size includes instruction's prefixes, if any.
NativeCodePtr InstructionDisassembler.get_jump_target_address | ( | void | ) | const |
Returns absolute address of target, if applicable.
For instructions other than relative JMP, CALL and conditional jumps, the value is undefined.
CondJumpType InstructionDisassembler.get_cond_jump_type | ( | void | ) | const |
Returns type of conditional jump.
unsigned InstructionDisassembler.get_operands_count | ( | void | ) | const |
Returns number of operands of the instruction.
const Opnd& InstructionDisassembler.get_opnd | ( | unsigned | i | ) | const |
Returns i-th
operand.
NativeCodePtr InstructionDisassembler.get_target_address_from_context | ( | const Registers * | pregs | ) | const |
Calculates and returns address of target basing on the decoded arguments and provided register context.
Works for both indirect and direct branches.
const char* InstructionDisassembler.get_reg_value | ( | Register | reg, | |
const Registers * | pcontext | |||
) | const |
Returns the appropriate register value for the register operand reg.
Genereated on Tue Mar 11 19:26:01 2008 by Doxygen.
(c) Copyright 2005, 2008 The Apache Software Foundation or its licensors, as applicable.