LLDB mainline
|
Classes | |
struct | InstructionOpcodeAndModrm |
These are the three values deciding instruction control flow kind. More... | |
Functions | |
lldb::InstructionControlFlowKind | MapOpcodeIntoControlFlowKind (InstructionOpcodeAndModrm opcode_and_modrm) |
Determine the InstructionControlFlowKind based on opcode and modrm bytes. | |
std::optional< InstructionOpcodeAndModrm > | InstructionLengthDecode (const uint8_t *inst_bytes, int bytes_len, bool is_exec_mode_64b) |
Decode an instruction into opcode, modrm and opcode_len. | |
lldb::InstructionControlFlowKind | GetControlFlowKind (bool is_exec_mode_64b, Opcode m_opcode) |
lldb::InstructionControlFlowKind x86::GetControlFlowKind | ( | bool | is_exec_mode_64b, |
Opcode | m_opcode | ||
) |
Definition at line 391 of file DisassemblerLLVMC.cpp.
References lldb::eInstructionControlFlowKindUnknown, lldb_private::Opcode::GetByteSize(), lldb_private::Opcode::GetOpcodeBytes(), InstructionLengthDecode(), and MapOpcodeIntoControlFlowKind().
Referenced by InstructionLLVMC::GetControlFlowKind().
std::optional< InstructionOpcodeAndModrm > x86::InstructionLengthDecode | ( | const uint8_t * | inst_bytes, |
int | bytes_len, | ||
bool | is_exec_mode_64b | ||
) |
Decode an instruction into opcode, modrm and opcode_len.
Refer to http://ref.x86asm.net/coder.html for the instruction bytes layout. Opcodes in x86 are generally the first byte of instruction, though two-byte instructions and prefixes exist. ModR/M is the byte following the opcode and adds additional information for how the instruction is executed.
[in] | inst_bytes | Raw bytes of the instruction |
[in] | bytes_len | The length of the inst_bytes array. |
[in] | is_exec_mode_64b | If true, the execution mode is 64 bit. |
Definition at line 263 of file DisassemblerLLVMC.cpp.
References x86::InstructionOpcodeAndModrm::modrm, x86::InstructionOpcodeAndModrm::opcode_len, and x86::InstructionOpcodeAndModrm::primary_opcode.
Referenced by GetControlFlowKind().
lldb::InstructionControlFlowKind x86::MapOpcodeIntoControlFlowKind | ( | InstructionOpcodeAndModrm | opcode_and_modrm | ) |
Determine the InstructionControlFlowKind based on opcode and modrm bytes.
Refer to http://ref.x86asm.net/coder.html for the full list of opcode and instruction set.
[in] | opcode_and_modrm | Contains primary_opcode byte, its length, and ModR/M byte. Refer to the struct InstructionOpcodeAndModrm for details. |
Definition at line 130 of file DisassemblerLLVMC.cpp.
References lldb::eInstructionControlFlowKindCall, lldb::eInstructionControlFlowKindCondJump, lldb::eInstructionControlFlowKindFarCall, lldb::eInstructionControlFlowKindFarJump, lldb::eInstructionControlFlowKindFarReturn, lldb::eInstructionControlFlowKindJump, lldb::eInstructionControlFlowKindOther, lldb::eInstructionControlFlowKindReturn, x86::InstructionOpcodeAndModrm::modrm, x86::InstructionOpcodeAndModrm::opcode_len, and x86::InstructionOpcodeAndModrm::primary_opcode.
Referenced by GetControlFlowKind().