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

#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::InstructionSPcollection
 
typedef collection::iterator iterator
 
typedef collection::const_iterator const_iterator
 

Private Attributes

collection m_instructions
 

Detailed Description

Definition at line 287 of file Disassembler.h.

Member Typedef Documentation

◆ collection

Definition at line 346 of file Disassembler.h.

◆ const_iterator

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

Definition at line 348 of file Disassembler.h.

◆ iterator

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

Definition at line 347 of file Disassembler.h.

Constructor & Destructor Documentation

◆ InstructionList()

InstructionList::InstructionList ( )

Definition at line 984 of file Disassembler.cpp.

◆ ~InstructionList()

InstructionList::~InstructionList ( )
default

Member Function Documentation

◆ Append()

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

◆ Clear()

void InstructionList::Clear ( )

◆ Dump()

void InstructionList::Dump ( Stream s,
bool  show_address,
bool  show_bytes,
bool  show_control_flow_kind,
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,
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.

Parameters
[in]startThe instruction index of the first instruction to check.
[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.
Returns
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 1050 of file Disassembler.cpp.

References m_instructions, and UINT32_MAX.

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

◆ GetInstructionAtAddress()

InstructionSP InstructionList::GetInstructionAtAddress ( const Address addr)

Get the instruction at the given address.

Returns
A valid InstructionSP if the address could be found, or null otherwise.

Definition at line 1009 of file Disassembler.cpp.

References GetIndexOfInstructionAtAddress(), GetInstructionAtIndex(), and UINT32_MAX.

◆ 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
private

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