LLDB
mainline
|
A direct call site. More...
#include <Function.h>
Public Member Functions | |
DirectCallEdge (const char *symbol_name, AddrType caller_address_type, lldb::addr_t caller_address, bool is_tail_call, CallSiteParameterArray &¶meters) | |
Construct a call edge using a symbol name to identify the callee, and a return PC within the calling function to identify a specific call site. More... | |
![]() | |
virtual | ~CallEdge ()=default |
std::pair< AddrType, lldb::addr_t > | GetCallerAddress (Function &caller, Target &target) const |
Return an address in the caller. More... | |
bool | IsTailCall () const |
llvm::ArrayRef< CallSiteParameter > | GetCallSiteParameters () const |
Get the call site parameters available at this call edge. More... | |
std::pair< bool, lldb::addr_t > | GetSortKey () const |
Non-tail-calls go first, sorted by the return address. More... | |
lldb::addr_t | GetReturnPCAddress (Function &caller, Target &target) const |
Get the load PC address of the instruction which executes after the call returns. More... | |
Private Attributes | |
union { | |
const char * symbol_name | |
Function * def | |
} | lazy_callee |
bool | resolved = false |
Whether or not an attempt was made to find the callee's definition. More... | |
Call site related structures | |
Function * | GetCallee (ModuleList &images, ExecutionContext &exe_ctx) override |
Get the callee's definition. More... | |
void | ParseSymbolFileAndResolve (ModuleList &images) |
Additional Inherited Members | |
![]() | |
enum | AddrType : uint8_t { AddrType::Call, AddrType::AfterCall } |
![]() | |
CallEdge (AddrType caller_address_type, lldb::addr_t caller_address, bool is_tail_call, CallSiteParameterArray &¶meters) | |
lldb::addr_t | GetUnresolvedReturnPCAddress () const |
Like GetReturnPCAddress, but returns an unresolved file address. More... | |
![]() | |
static lldb::addr_t | GetLoadAddress (lldb::addr_t unresolved_pc, Function &caller, Target &target) |
Helper that finds the load address of unresolved_pc , a file address which refers to an instruction within caller . More... | |
A direct call site.
Used to represent call sites where the address of the callee is fixed (e.g. a function call in C in which the call target is not a function pointer).
Definition at line 336 of file Function.h.
|
inline |
Construct a call edge using a symbol name to identify the callee, and a return PC within the calling function to identify a specific call site.
Definition at line 340 of file Function.h.
References lazy_callee, and symbol_name.
|
overridevirtual |
Get the callee's definition.
Note that this might lazily invoke the DWARF parser. A register context from the caller's activation is needed to find indirect call targets.
Implements lldb_private::CallEdge.
Definition at line 188 of file Function.cpp.
References lazy_callee, ParseSymbolFileAndResolve(), and resolved.
|
private |
Definition at line 153 of file Function.cpp.
References lldb_private::Address::CalculateSymbolContextFunction(), lldb_private::ModuleList::FindFunctionSymbols(), lldb_private::GetLog(), lldb_private::SymbolContextList::GetSize(), lldb_private::Address::IsValid(), lazy_callee, LLDB_LOG, resolved, and lldb_private::Step.
Referenced by GetCallee().
Function* lldb_private::DirectCallEdge::def |
Definition at line 359 of file Function.h.
union { ... } lldb_private::DirectCallEdge::lazy_callee |
Referenced by DirectCallEdge(), GetCallee(), and ParseSymbolFileAndResolve().
|
private |
Whether or not an attempt was made to find the callee's definition.
Definition at line 363 of file Function.h.
Referenced by GetCallee(), and ParseSymbolFileAndResolve().
const char* lldb_private::DirectCallEdge::symbol_name |
Definition at line 358 of file Function.h.
Referenced by DirectCallEdge().