|
LLDB mainline
|
A direct call site. More...
#include <Function.h>
Private Attributes | |
| const char * | m_symbol_name |
Call site related structures | |
| 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. | |
| SymbolContext | GetCallee (ModuleList &images, ExecutionContext &exe_ctx) override |
Get the callee's definition, resolved against images. | |
| Address | ResolveCalleeAddress (ModuleList &images) const |
Additional Inherited Members | |
| Public Types inherited from lldb_private::CallEdge | |
| enum class | AddrType : uint8_t { Call , AfterCall } |
| Public Member Functions inherited from lldb_private::CallEdge | |
| 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. | |
| 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 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. | |
| static SymbolContext | ResolveCallee (const Address &addr) |
Find the function containing addr. | |
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 328 of file Function.h.
| DirectCallEdge::DirectCallEdge | ( | const char * | symbol_name, |
| AddrType | caller_address_type, | ||
| lldb::addr_t | caller_address, | ||
| bool | is_tail_call, | ||
| CallSiteParameterArray && | parameters ) |
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 191 of file Function.cpp.
References lldb_private::CallEdge::CallEdge(), lldb_private::CallEdge::caller_address, lldb_private::CallEdge::caller_address_type, lldb_private::CallEdge::is_tail_call, m_symbol_name, and lldb_private::CallEdge::parameters.
|
overridevirtual |
Get the callee's definition, resolved against images.
The result is never cached. A CallEdge is owned by a Module in the shared module cache, so it outlives any one Target, while the callee it resolves to depends on that Target's image list and dies with its own module. The returned symbol context anchors that module.
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 199 of file Function.cpp.
References lldb_private::CallEdge::ResolveCallee(), and ResolveCalleeAddress().
|
private |
Definition at line 164 of file Function.cpp.
References lldb_private::ModuleList::FindFunctionSymbols(), lldb_private::GetLog(), lldb_private::SymbolContextList::GetSize(), lldb_private::Address::IsValid(), LLDB_LOG, m_symbol_name, and lldb_private::Step.
Referenced by GetCallee().
|
private |
Definition at line 342 of file Function.h.
Referenced by DirectCallEdge(), and ResolveCalleeAddress().