LLDB mainline
|
Represent a call made within a Function. More...
#include "lldb/Symbol/Function.h"
Public Types | |
enum class | AddrType : uint8_t { Call , AfterCall } |
Public Member Functions | |
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. | |
Protected Member Functions | |
lldb::addr_t | GetUnresolvedReturnPCAddress () const |
Like GetReturnPCAddress, but returns an unresolved file address. | |
Private Attributes | |
lldb::addr_t | caller_address |
AddrType | caller_address_type |
bool | is_tail_call |
CallSiteParameterArray | parameters |
Call site related structures | |
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. | |
CallEdge (AddrType caller_address_type, lldb::addr_t caller_address, bool is_tail_call, CallSiteParameterArray &¶meters) | |
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 . | |
Represent a call made within a Function.
This can be used to find a path in the call graph between two functions, or to evaluate DW_OP_entry_value.
Definition at line 267 of file Function.h.
|
strong |
Enumerator | |
---|---|
Call | |
AfterCall |
Definition at line 269 of file Function.h.
|
virtualdefault |
|
protected |
Definition at line 127 of file Function.cpp.
|
pure virtual |
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.
Implemented in lldb_private::DirectCallEdge, and lldb_private::IndirectCallEdge.
Referenced by Evaluate_DW_OP_entry_value(), and FindInterveningFrames().
|
inline |
Return an address in the caller.
This can either be the address of the call instruction, or the address of the instruction after the call.
Definition at line 287 of file Function.h.
References caller_address, caller_address_type, and GetLoadAddress().
|
inline |
Get the call site parameters available at this call edge.
Definition at line 296 of file Function.h.
References parameters.
Referenced by Evaluate_DW_OP_entry_value().
|
staticprotected |
Helper that finds the load address of unresolved_pc
, a file address which refers to an instruction within caller
.
Definition at line 132 of file Function.cpp.
References lldb_private::Function::GetAddressRange(), lldb_private::AddressRange::GetBaseAddress(), lldb_private::Address::GetLoadAddress(), lldb_private::GetLog(), lldb_private::Address::GetModule(), LLDB_INVALID_ADDRESS, LLDB_LOG, and lldb_private::Step.
Referenced by GetCallerAddress(), and GetReturnPCAddress().
lldb::addr_t CallEdge::GetReturnPCAddress | ( | Function & | caller, |
Target & | target | ||
) | const |
Get the load PC address of the instruction which executes after the call returns.
Returns LLDB_INVALID_ADDRESS iff this is a tail call. caller
is the Function containing this call, and target
is the Target which made the call.
Definition at line 155 of file Function.cpp.
References GetLoadAddress(), and GetUnresolvedReturnPCAddress().
|
inline |
Non-tail-calls go first, sorted by the return address.
They are followed by tail calls, which have no specific order.
Definition at line 302 of file Function.h.
References GetUnresolvedReturnPCAddress(), and is_tail_call.
|
inlineprotected |
Like GetReturnPCAddress, but returns an unresolved file address.
Definition at line 316 of file Function.h.
References AfterCall, caller_address, caller_address_type, is_tail_call, and LLDB_INVALID_ADDRESS.
Referenced by GetReturnPCAddress(), and GetSortKey().
|
inline |
Definition at line 293 of file Function.h.
References is_tail_call.
|
private |
Definition at line 323 of file Function.h.
Referenced by GetCallerAddress(), and GetUnresolvedReturnPCAddress().
|
private |
Definition at line 324 of file Function.h.
Referenced by GetCallerAddress(), and GetUnresolvedReturnPCAddress().
|
private |
Definition at line 325 of file Function.h.
Referenced by GetSortKey(), GetUnresolvedReturnPCAddress(), and IsTailCall().
|
private |
Definition at line 327 of file Function.h.
Referenced by GetCallSiteParameters().