LLDB mainline
|
#include <Disassembler.h>
Public Member Functions | |
InstructionList () | |
~InstructionList () | |
size_t | GetSize () const |
uint32_t | GetMaxOpcocdeByteSize () const |
lldb::InstructionSP | GetInstructionAtIndex (size_t idx) const |
lldb::InstructionSP | GetInstructionAtAddress (const Address &addr) |
Get the instruction at the given address. | |
uint32_t | GetIndexOfNextBranchInstruction (uint32_t start, bool ignore_calls, bool *found_calls) const |
Get the index of the next branch instruction. | |
uint32_t | GetIndexOfInstructionAtLoadAddress (lldb::addr_t load_addr, Target &target) |
uint32_t | GetIndexOfInstructionAtAddress (const Address &addr) |
void | Clear () |
void | Append (lldb::InstructionSP &inst_sp) |
void | Dump (Stream *s, bool show_address, bool show_bytes, bool show_control_flow_kind, const ExecutionContext *exe_ctx) |
Private Types | |
typedef std::vector< lldb::InstructionSP > | collection |
typedef collection::iterator | iterator |
typedef collection::const_iterator | const_iterator |
Private Attributes | |
collection | m_instructions |
Definition at line 287 of file Disassembler.h.
|
private |
Definition at line 346 of file Disassembler.h.
|
private |
Definition at line 348 of file Disassembler.h.
|
private |
Definition at line 347 of file Disassembler.h.
InstructionList::InstructionList | ( | ) |
Definition at line 967 of file Disassembler.cpp.
|
default |
void InstructionList::Append | ( | lldb::InstructionSP & | inst_sp | ) |
Definition at line 1027 of file Disassembler.cpp.
References m_instructions.
Referenced by DisassemblerLLVMC::DecodeInstructions(), and lldb_private::ArchitectureMips::GetInstructionAtAddress().
void InstructionList::Clear | ( | ) |
Definition at line 1025 of file Disassembler.cpp.
References m_instructions.
Referenced by DisassemblerLLVMC::DecodeInstructions(), and lldb_private::Disassembler::ParseInstructions().
void InstructionList::Dump | ( | Stream * | s, |
bool | show_address, | ||
bool | show_bytes, | ||
bool | show_control_flow_kind, | ||
const ExecutionContext * | exe_ctx | ||
) |
Definition at line 999 of file Disassembler.cpp.
References lldb_private::Stream::EOL(), lldb_private::Target::GetDebugger(), lldb_private::Debugger::GetDisassemblyFormat(), GetMaxOpcocdeByteSize(), lldb_private::ExecutionContext::GetTargetRef(), lldb_private::ExecutionContext::HasTargetScope(), m_instructions, and lldb_private::FormatEntity::Parse().
Referenced by lldb_private::IRExecutionUnit::DisassembleFunction().
uint32_t InstructionList::GetIndexOfInstructionAtAddress | ( | const Address & | addr | ) |
Definition at line 1058 of file Disassembler.cpp.
References m_instructions, and UINT32_MAX.
Referenced by lldb_private::Process::AdvanceAddressToNextBranchInstruction(), GetIndexOfInstructionAtLoadAddress(), and GetInstructionAtAddress().
uint32_t InstructionList::GetIndexOfInstructionAtLoadAddress | ( | lldb::addr_t | load_addr, |
Target & | target | ||
) |
Definition at line 1071 of file Disassembler.cpp.
References GetIndexOfInstructionAtAddress(), and lldb_private::Address::SetLoadAddress().
uint32_t InstructionList::GetIndexOfNextBranchInstruction | ( | uint32_t | start, |
bool | ignore_calls, | ||
bool * | found_calls | ||
) | const |
Get the index of the next branch instruction.
Given a list of instructions, find the next branch instruction in the list by returning an index.
[in] | start | The instruction index of the first instruction to check. |
[in] | ignore_calls | It true, then fine the first branch instruction that isn't a function call (a branch that calls and returns to the next instruction). If false, find the instruction index of any branch in the list. |
[out] | found_calls | If non-null, this will be set to true if any calls were found in extending the range. |
Definition at line 1033 of file Disassembler.cpp.
References m_instructions, and UINT32_MAX.
Referenced by lldb_private::Process::AdvanceAddressToNextBranchInstruction(), and lldb_private::ThreadPlanStepRange::SetNextBranchBreakpoint().
InstructionSP InstructionList::GetInstructionAtAddress | ( | const Address & | addr | ) |
Get the instruction at the given address.
Definition at line 992 of file Disassembler.cpp.
References GetIndexOfInstructionAtAddress(), GetInstructionAtIndex(), and UINT32_MAX.
InstructionSP InstructionList::GetInstructionAtIndex | ( | size_t | idx | ) | const |
Definition at line 985 of file Disassembler.cpp.
References m_instructions.
Referenced by lldb_private::Process::AdvanceAddressToNextBranchInstruction(), GetInstructionAtAddress(), lldb_private::ArchitectureMips::GetInstructionAtAddress(), UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly(), GetPtrauthInstructionInfo(), lldb_private::DynamicLoaderWindowsDYLD::GetStepThroughTrampolinePlan(), lldb_private::ThreadPlanAssemblyTracer::Log(), lldb_private::Disassembler::PrintInstructions(), and lldb_private::ThreadPlanStepRange::SetNextBranchBreakpoint().
uint32_t InstructionList::GetMaxOpcocdeByteSize | ( | ) | const |
Definition at line 973 of file Disassembler.cpp.
References m_instructions.
Referenced by Dump(), UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly(), lldb_private::ThreadPlanAssemblyTracer::Log(), and lldb_private::Disassembler::PrintInstructions().
size_t InstructionList::GetSize | ( | ) | const |
Definition at line 971 of file Disassembler.cpp.
References m_instructions.
Referenced by lldb_private::ArchitectureMips::GetInstructionAtAddress(), UnwindAssemblyInstEmulation::GetNonCallSiteUnwindPlanFromAssembly(), lldb_private::ThreadPlanAssemblyTracer::Log(), lldb_private::Disassembler::PrintInstructions(), and lldb_private::ThreadPlanStepRange::SetNextBranchBreakpoint().
|
private |
Definition at line 350 of file Disassembler.h.
Referenced by Append(), Clear(), Dump(), GetIndexOfInstructionAtAddress(), GetIndexOfNextBranchInstruction(), GetInstructionAtIndex(), GetMaxOpcocdeByteSize(), and GetSize().