LLDB  mainline
Public Member Functions | Private Types | Private Attributes | List of all members
lldb_private::InstructionList Class Reference

#include <Disassembler.h>

Collaboration diagram for lldb_private::InstructionList:
Collaboration graph

Public Member Functions

 InstructionList ()
 ~InstructionList ()
size_t GetSize () const
uint32_t GetMaxOpcocdeByteSize () const
lldb::InstructionSP GetInstructionAtIndex (size_t idx) const
uint32_t GetIndexOfNextBranchInstruction (uint32_t start, Target &target, bool ignore_calls, bool *found_calls) const
 Get the index of the next branch instruction. More...
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, 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

Detailed Description

Definition at line 262 of file Disassembler.h.

Member Typedef Documentation

◆ collection

typedef std::vector<lldb::InstructionSP> lldb_private::InstructionList::collection

Definition at line 318 of file Disassembler.h.

◆ const_iterator

typedef collection::const_iterator lldb_private::InstructionList::const_iterator

Definition at line 320 of file Disassembler.h.

◆ iterator

typedef collection::iterator lldb_private::InstructionList::iterator

Definition at line 319 of file Disassembler.h.

Constructor & Destructor Documentation

◆ InstructionList()

InstructionList::InstructionList ( )

Definition at line 935 of file Disassembler.cpp.

References ~InstructionList().

◆ ~InstructionList()

InstructionList::~InstructionList ( )

Referenced by InstructionList().

Member Function Documentation

◆ Append()

void InstructionList::Append ( lldb::InstructionSP &  inst_sp)

◆ Clear()

void InstructionList::Clear ( )

Definition at line 984 of file Disassembler.cpp.

References m_instructions.

Referenced by DisassemblerLLVMC::DecodeInstructions().

◆ Dump()

void InstructionList::Dump ( Stream s,
bool  show_address,
bool  show_bytes,
const ExecutionContext exe_ctx 

◆ GetIndexOfInstructionAtAddress()

uint32_t InstructionList::GetIndexOfInstructionAtAddress ( const Address addr)

◆ GetIndexOfInstructionAtLoadAddress()

uint32_t InstructionList::GetIndexOfInstructionAtLoadAddress ( lldb::addr_t  load_addr,
Target target 

◆ GetIndexOfNextBranchInstruction()

uint32_t InstructionList::GetIndexOfNextBranchInstruction ( uint32_t  start,
Target target,
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]startThe instruction index of the first instruction to check.
[in]targetA LLDB target object that is used to resolve addresses.
[in]ignore_callsIt 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_callsIf non-null, this will be set to true if any calls were found in extending the range.
The instruction index of the first branch that is at or past start. Returns UINT32_MAX if no matching branches are found.

Definition at line 992 of file Disassembler.cpp.

References error(), lldb_private::Target::GetArchitecture(), lldb_private::ArchSpec::GetTriple(), LLDB_INVALID_ADDRESS, m_instructions, lldb_private::Target::ReadMemory(), lldb_private::Status::Success(), and UINT32_MAX.

Referenced by lldb_private::Process::AdvanceAddressToNextBranchInstruction(), and lldb_private::ThreadPlanStepRange::SetNextBranchBreakpoint().

◆ GetInstructionAtIndex()

InstructionSP InstructionList::GetInstructionAtIndex ( size_t  idx) const

◆ GetMaxOpcocdeByteSize()

uint32_t InstructionList::GetMaxOpcocdeByteSize ( ) const

◆ GetSize()

size_t InstructionList::GetSize ( ) const

Member Data Documentation

◆ m_instructions

collection lldb_private::InstructionList::m_instructions

The documentation for this class was generated from the following files: