LLDB mainline
|
An indirect call site. More...
#include <Function.h>
Public Member Functions | |
Call site related structures | |
IndirectCallEdge (DWARFExpressionList call_target, AddrType caller_address_type, lldb::addr_t caller_address, bool is_tail_call, CallSiteParameterArray &¶meters) | |
Construct a call edge using a DWARFExpression to identify the callee, and a return PC within the calling function to identify a specific call site. | |
Function * | GetCallee (ModuleList &images, ExecutionContext &exe_ctx) override |
Get the callee's definition. | |
Public Member Functions inherited from lldb_private::CallEdge | |
virtual Function * | GetCallee (ModuleList &images, ExecutionContext &exe_ctx)=0 |
Get the callee's definition. | |
std::pair< AddrType, lldb::addr_t > | GetCallerAddress (Function &caller, Target &target) const |
Return an address in the caller. | |
bool | IsTailCall () const |
llvm::ArrayRef< CallSiteParameter > | GetCallSiteParameters () const |
Get the call site parameters available at this call edge. | |
std::pair< bool, lldb::addr_t > | GetSortKey () const |
Non-tail-calls go first, sorted by the return address. | |
virtual | ~CallEdge () |
lldb::addr_t | GetReturnPCAddress (Function &caller, Target &target) const |
Get the load PC address of the instruction which executes after the call returns. | |
Private Attributes | |
DWARFExpressionList | call_target |
Additional Inherited Members | |
Public Types inherited from lldb_private::CallEdge | |
enum class | AddrType : uint8_t { Call , AfterCall } |
Protected Member Functions inherited from lldb_private::CallEdge | |
lldb::addr_t | GetUnresolvedReturnPCAddress () const |
Like GetReturnPCAddress, but returns an unresolved file address. | |
CallEdge (AddrType caller_address_type, lldb::addr_t caller_address, bool is_tail_call, CallSiteParameterArray &¶meters) | |
Static Protected Member Functions inherited from lldb_private::CallEdge | |
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 . | |
An indirect call site.
Used to represent call sites where the address of the callee is not fixed, e.g. a call to a C++ virtual function (where the address is loaded out of a vtable), or a call to a function pointer in C.
Definition at line 362 of file Function.h.
IndirectCallEdge::IndirectCallEdge | ( | DWARFExpressionList | call_target, |
AddrType | caller_address_type, | ||
lldb::addr_t | caller_address, | ||
bool | is_tail_call, | ||
CallSiteParameterArray && | parameters | ||
) |
Construct a call edge using a DWARFExpression to identify the callee, and a return PC within the calling function to identify a specific call site.
Definition at line 210 of file Function.cpp.
|
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 219 of file Function.cpp.
References lldb_private::Address::CalculateSymbolContextFunction(), call_target, error(), lldb_private::DWARFExpressionList::Evaluate(), lldb_private::GetLog(), lldb_private::ExecutionContext::GetRegisterContext(), lldb_private::ExecutionContext::GetTargetPtr(), LLDB_INVALID_ADDRESS, LLDB_LOG, LLDB_LOG_ERROR, lldb_private::Target::ResolveLoadAddress(), and lldb_private::Step.
|
private |
Definition at line 376 of file Function.h.
Referenced by GetCallee().