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

#include <DWARFExpressionList.h>

Collaboration diagram for lldb_private::DWARFExpressionList:
Collaboration graph
[legend]

Classes

struct  DWARFExpressionCompare
 

Public Member Functions

 DWARFExpressionList ()=default
 
 DWARFExpressionList (lldb::ModuleSP module_sp, const DWARFUnit *dwarf_cu, lldb::addr_t func_file_addr)
 
 DWARFExpressionList (lldb::ModuleSP module_sp, DWARFExpression expr, const DWARFUnit *dwarf_cu)
 
bool IsValid () const
 Return true if the location expression contains data. More...
 
void Clear ()
 
bool IsAlwaysValidSingleExpr () const
 
bool AddExpression (lldb::addr_t base, lldb::addr_t end, DWARFExpression expr)
 
bool GetExpressionData (DataExtractor &data, lldb::addr_t func_load_addr=LLDB_INVALID_ADDRESS, lldb::addr_t file_addr=0) const
 Get the expression data at the file address. More...
 
void Sort ()
 Sort m_expressions. More...
 
void SetFuncFileAddress (lldb::addr_t func_file_addr)
 
lldb::addr_t GetFuncFileAddress ()
 
const DWARFExpressionGetExpressionAtAddress (lldb::addr_t func_load_addr, lldb::addr_t load_addr) const
 
const DWARFExpressionGetAlwaysValidExpr () const
 
DWARFExpressionGetMutableExpressionAtAddress (lldb::addr_t func_load_addr=LLDB_INVALID_ADDRESS, lldb::addr_t load_addr=0)
 
size_t GetSize () const
 
bool ContainsThreadLocalStorage () const
 
bool LinkThreadLocalStorage (lldb::ModuleSP new_module_sp, std::function< lldb::addr_t(lldb::addr_t file_addr)> const &link_address_callback)
 
bool MatchesOperand (StackFrame &frame, const Instruction::Operand &operand) const
 
bool DumpLocations (Stream *s, lldb::DescriptionLevel level, lldb::addr_t func_load_addr, lldb::addr_t file_addr, ABI *abi) const
 Dump locations that contains file_addr if it's valid. More...
 
void GetDescription (Stream *s, lldb::DescriptionLevel level, ABI *abi) const
 Dump all locaitons with each seperated by new line. More...
 
bool ContainsAddress (lldb::addr_t func_load_addr, lldb::addr_t addr) const
 Search for a load address in the dwarf location list. More...
 
void SetModule (const lldb::ModuleSP &module)
 
bool Evaluate (ExecutionContext *exe_ctx, RegisterContext *reg_ctx, lldb::addr_t func_load_addr, const Value *initial_value_ptr, const Value *object_address_ptr, Value &result, Status *error_ptr) const
 

Private Types

using ExprVec = RangeDataVector< lldb::addr_t, lldb::addr_t, DWARFExpression, 0, DWARFExpressionCompare >
 
using Entry = ExprVec::Entry
 
using const_iterator = ExprVec::Collection::const_iterator
 

Private Member Functions

const_iterator begin () const
 
const_iterator end () const
 

Private Attributes

ExprVec m_exprs
 
lldb::ModuleWP m_module_wp
 Module which defined this expression. More...
 
const DWARFUnitm_dwarf_cu = nullptr
 The DWARF compile unit this expression belongs to. More...
 
lldb::addr_t m_func_file_addr = LLDB_INVALID_ADDRESS
 

Detailed Description

"lldb/Expression/DWARFExpressionList.h" Encapsulates a range map from file address range to a single DWARF location expression.

Definition at line 23 of file DWARFExpressionList.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 144 of file DWARFExpressionList.h.

◆ Entry

Definition at line 128 of file DWARFExpressionList.h.

◆ ExprVec

Definition at line 127 of file DWARFExpressionList.h.

Constructor & Destructor Documentation

◆ DWARFExpressionList() [1/3]

lldb_private::DWARFExpressionList::DWARFExpressionList ( )
default

◆ DWARFExpressionList() [2/3]

lldb_private::DWARFExpressionList::DWARFExpressionList ( lldb::ModuleSP  module_sp,
const DWARFUnit dwarf_cu,
lldb::addr_t  func_file_addr 
)
inline

Definition at line 27 of file DWARFExpressionList.h.

◆ DWARFExpressionList() [3/3]

lldb_private::DWARFExpressionList::DWARFExpressionList ( lldb::ModuleSP  module_sp,
DWARFExpression  expr,
const DWARFUnit dwarf_cu 
)
inline

Definition at line 32 of file DWARFExpressionList.h.

References AddExpression(), and LLDB_INVALID_ADDRESS.

Member Function Documentation

◆ AddExpression()

bool DWARFExpressionList::AddExpression ( lldb::addr_t  base,
lldb::addr_t  end,
DWARFExpression  expr 
)

◆ begin()

const_iterator lldb_private::DWARFExpressionList::begin ( ) const
inlineprivate

◆ Clear()

void lldb_private::DWARFExpressionList::Clear ( )
inline

◆ ContainsAddress()

bool DWARFExpressionList::ContainsAddress ( lldb::addr_t  func_load_addr,
lldb::addr_t  addr 
) const

Search for a load address in the dwarf location list.

Parameters
[in]func_load_addrThe actual address of the function containing this location list.
[in]addrThe address to resolve.
Returns
True if IsLocationList() is true and the address was found; false otherwise.

Definition at line 50 of file DWARFExpressionList.cpp.

Referenced by lldb_private::Variable::LocationIsValidForAddress(), and lldb_private::Variable::LocationIsValidForFrame().

◆ ContainsThreadLocalStorage()

bool DWARFExpressionList::ContainsThreadLocalStorage ( ) const

◆ DumpLocations()

bool DWARFExpressionList::DumpLocations ( Stream s,
lldb::DescriptionLevel  level,
lldb::addr_t  func_load_addr,
lldb::addr_t  file_addr,
ABI abi 
) const

◆ end()

const_iterator lldb_private::DWARFExpressionList::end ( ) const
inlineprivate

◆ Evaluate()

bool DWARFExpressionList::Evaluate ( ExecutionContext exe_ctx,
RegisterContext reg_ctx,
lldb::addr_t  func_load_addr,
const Value initial_value_ptr,
const Value object_address_ptr,
Value result,
Status error_ptr 
) const

◆ GetAlwaysValidExpr()

const DWARFExpression * DWARFExpressionList::GetAlwaysValidExpr ( ) const

Definition at line 24 of file DWARFExpressionList.cpp.

References LLDB_INVALID_ADDRESS.

Referenced by SymbolFileDWARF::ParseVariableDIE().

◆ GetDescription()

void DWARFExpressionList::GetDescription ( Stream s,
lldb::DescriptionLevel  level,
ABI abi 
) const

◆ GetExpressionAtAddress()

const DWARFExpression * DWARFExpressionList::GetExpressionAtAddress ( lldb::addr_t  func_load_addr,
lldb::addr_t  load_addr 
) const

Definition at line 58 of file DWARFExpressionList.cpp.

References LLDB_INVALID_ADDRESS, and UINT32_MAX.

◆ GetExpressionData()

bool DWARFExpressionList::GetExpressionData ( DataExtractor data,
lldb::addr_t  func_load_addr = LLDB_INVALID_ADDRESS,
lldb::addr_t  file_addr = 0 
) const

◆ GetFuncFileAddress()

lldb::addr_t lldb_private::DWARFExpressionList::GetFuncFileAddress ( )
inline

Definition at line 60 of file DWARFExpressionList.h.

References m_func_file_addr.

◆ GetMutableExpressionAtAddress()

DWARFExpression * DWARFExpressionList::GetMutableExpressionAtAddress ( lldb::addr_t  func_load_addr = LLDB_INVALID_ADDRESS,
lldb::addr_t  load_addr = 0 
)

◆ GetSize()

size_t lldb_private::DWARFExpressionList::GetSize ( ) const
inline

◆ IsAlwaysValidSingleExpr()

bool DWARFExpressionList::IsAlwaysValidSingleExpr ( ) const

◆ IsValid()

bool lldb_private::DWARFExpressionList::IsValid ( ) const
inline

◆ LinkThreadLocalStorage()

bool DWARFExpressionList::LinkThreadLocalStorage ( lldb::ModuleSP  new_module_sp,
std::function< lldb::addr_t(lldb::addr_t file_addr)> const &  link_address_callback 
)

◆ MatchesOperand()

bool DWARFExpressionList::MatchesOperand ( StackFrame frame,
const Instruction::Operand operand 
) const

◆ SetFuncFileAddress()

void lldb_private::DWARFExpressionList::SetFuncFileAddress ( lldb::addr_t  func_file_addr)
inline

◆ SetModule()

void lldb_private::DWARFExpressionList::SetModule ( const lldb::ModuleSP &  module)
inline

Definition at line 109 of file DWARFExpressionList.h.

References m_module_wp.

Referenced by SymbolFileDWARF::ParseVariableDIE().

◆ Sort()

void lldb_private::DWARFExpressionList::Sort ( )
inline

Member Data Documentation

◆ m_dwarf_cu

const DWARFUnit* lldb_private::DWARFExpressionList::m_dwarf_cu = nullptr
private

The DWARF compile unit this expression belongs to.

It is used to evaluate values indexing into the .debug_addr section (e.g. DW_OP_GNU_addr_index, DW_OP_GNU_const_index)

Definition at line 139 of file DWARFExpressionList.h.

◆ m_exprs

ExprVec lldb_private::DWARFExpressionList::m_exprs
private

Definition at line 131 of file DWARFExpressionList.h.

Referenced by begin(), Clear(), end(), GetSize(), IsValid(), and Sort().

◆ m_func_file_addr

lldb::addr_t lldb_private::DWARFExpressionList::m_func_file_addr = LLDB_INVALID_ADDRESS
private

Definition at line 142 of file DWARFExpressionList.h.

Referenced by GetFuncFileAddress(), and SetFuncFileAddress().

◆ m_module_wp

lldb::ModuleWP lldb_private::DWARFExpressionList::m_module_wp
private

Module which defined this expression.

Definition at line 134 of file DWARFExpressionList.h.

Referenced by SetModule().


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