9#ifndef LLDB_SYMBOL_FUNCTION_H
10#define LLDB_SYMBOL_FUNCTION_H
18#include "llvm/ADT/ArrayRef.h"
24class ExecutionContext;
87 void Dump(
Stream *s,
bool show_fullpaths)
const;
201 void Dump(
Stream *s,
bool show_fullpaths)
const;
479 llvm::ArrayRef<std::unique_ptr<CallEdge>>
GetCallEdges();
581 void Dump(
Stream *s,
bool show_context)
const;
628 bool force_live_memory =
false);
631 Stream &strm,
bool force_live_memory =
false);
A section + offset based address range class.
A class that describes a single lexical block.
AddressRanges GetRanges()
Represent a call made within a Function.
AddrType caller_address_type
virtual Function * GetCallee(ModuleList &images, ExecutionContext &exe_ctx)=0
Get the callee's definition.
std::pair< bool, lldb::addr_t > GetSortKey() const
Non-tail-calls go first, sorted by the return address.
std::pair< AddrType, lldb::addr_t > GetCallerAddress(Function &caller, Target &target) const
Return an address in the caller.
CallSiteParameterArray parameters
llvm::ArrayRef< CallSiteParameter > GetCallSiteParameters() const
Get the call site parameters available at this call edge.
lldb::addr_t GetReturnPCAddress(Function &caller, Target &target) const
Get the load PC address of the instruction which executes after the call returns.
lldb::addr_t caller_address
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 wi...
lldb::addr_t GetUnresolvedReturnPCAddress() const
Like GetReturnPCAddress, but returns an unresolved file address.
A class that describes a compilation unit.
Represents a generic declaration context in a program.
Generic representation of a type in a programming language.
A uniqued constant string class.
"lldb/Expression/DWARFExpressionList.h" Encapsulates a range map from file address range to a single ...
A class that describes the declaration location of a lldb object.
Function * GetCallee(ModuleList &images, ExecutionContext &exe_ctx) override
Get the callee's definition.
bool resolved
Whether or not an attempt was made to find the callee's definition.
void ParseSymbolFileAndResolve(ModuleList &images)
union lldb_private::DirectCallEdge::@22 lazy_callee
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
A class that contains generic function information.
Declaration & GetDeclaration()
Get accessor for the declaration information.
void Dump(Stream *s, bool show_fullpaths) const
Dump a description of this object to a Stream.
virtual ~FunctionInfo()
Destructor.
ConstString GetName() const
Get accessor for the method name.
ConstString m_name
Function method name (not a mangled name).
virtual size_t MemorySize() const
Get the memory cost of this object.
static int Compare(const FunctionInfo &lhs, const FunctionInfo &rhs)
Compare two function information objects.
Declaration m_declaration
Information describing where this function information was defined.
A class that describes a function.
std::vector< std::unique_ptr< CallEdge > > m_call_edges
Outgoing call edges.
uint32_t m_prologue_byte_size
Compute the prologue size once and cache it.
bool GetIsOptimized()
Get whether compiler optimizations were enabled for this function.
lldb::user_id_t m_type_uid
The user ID of for the prototype Type for this function.
Function(const Function &)=delete
void GetDescription(Stream *s, lldb::DescriptionLevel level, Target *target)
void GetStartLineSourceInfo(lldb::SupportFileSP &source_file_sp, uint32_t &line_no)
Find the file and line number of the source location of the start of the function.
const Function & operator=(const Function &)=delete
const AddressRange & GetAddressRange()
DEPRECATED: Use GetAddressRanges instead.
CompilerType GetCompilerType()
DWARFExpressionList & GetFrameBaseExpression()
Get accessor for the frame base location.
bool IsTopLevelFunction()
Get whether this function represents a 'top-level' function.
lldb::ModuleSP CalculateSymbolContextModule() override
CompileUnit * m_comp_unit
The compile unit that owns this function.
ConstString GetName() const
const Mangled & GetMangled() const
CallEdge * GetCallEdgeForReturnAddress(lldb::addr_t return_pc, Target &target)
Get the outgoing call edge from this function which has the given return address return_pc,...
llvm::ArrayRef< std::unique_ptr< CallEdge > > GetCallEdges()
Get the outgoing call edges from this function, sorted by their return PC addresses (in increasing or...
void Dump(Stream *s, bool show_context) const
Dump a description of this object to a Stream.
Block m_block
All lexical blocks contained in this function.
DWARFExpressionList m_frame_base
The frame base expression for variables that are relative to the frame pointer.
Type * m_type
The function prototype type for this function that includes the function info (FunctionInfo),...
void CalculateSymbolContext(SymbolContext *sc) override
Reconstruct the object's symbol context into sc.
void DumpSymbolContext(Stream *s) override
Dump the object's symbol context to the stream s.
@ flagsCalculatedPrologueSize
Whether we already tried to calculate the prologue size.
llvm::ArrayRef< std::unique_ptr< CallEdge > > GetTailCallingEdges()
Get the outgoing tail-calling edges from this function.
bool GetDisassembly(const ExecutionContext &exe_ctx, const char *flavor, Stream &strm, bool force_live_memory=false)
Type * GetType()
Get accessor for the type that describes the function return value type, and parameter types.
AddressRange m_range
The function address range that covers the widest range needed to contain all blocks.
std::mutex m_call_edges_lock
Exclusive lock that controls read/write access to m_call_edges and m_call_edges_resolved.
lldb::LanguageType GetLanguage() const
uint32_t GetPrologueByteSize()
Get the size of the prologue instructions for this function.
CompilerDeclContext GetDeclContext()
Get the DeclContext for this function, if available.
AddressRanges GetAddressRanges()
void GetEndLineSourceInfo(FileSpec &source_file, uint32_t &line_no)
Find the file and line number of the source location of the end of the function.
CompileUnit * CalculateSymbolContextCompileUnit() override
CompileUnit * GetCompileUnit()
Get accessor for the compile unit that owns this function.
~Function() override
Destructor.
bool m_call_edges_resolved
Whether call site info has been parsed.
ConstString GetDisplayName() const
ConstString GetNameNoArguments() const
lldb::DisassemblerSP GetInstructions(const ExecutionContext &exe_ctx, const char *flavor, bool force_live_memory=false)
Function * CalculateSymbolContextFunction() override
const DWARFExpressionList & GetFrameBaseExpression() const
Get const accessor for the frame base location.
std::vector< CompilerContext > GetCompilerContext()
Get the CompilerContext for this function, if available.
size_t MemorySize() const
Get the memory cost of this object.
Mangled m_mangled
The mangled function name if any.
Block & GetBlock(bool can_create)
Get accessor for the block list.
Function * GetCallee(ModuleList &images, ExecutionContext &exe_ctx) override
Get the callee's definition.
DWARFExpressionList call_target
A class that describes information for an inlined function.
size_t MemorySize() const override
Get the memory cost of this object.
void DumpStopContext(Stream *s) const
ConstString GetDisplayName() const
Declaration & GetCallSite()
Get accessor for the call site declaration information.
ConstString GetName() const
~InlineFunctionInfo() override
Destructor.
Mangled m_mangled
Mangled inlined function name (can be empty if there is no mangled information).
int Compare(const InlineFunctionInfo &lhs, const InlineFunctionInfo &rhs)
Compare two inlined function information objects.
void Dump(Stream *s, bool show_fullpaths) const
Dump a description of this object to a Stream.
Mangled & GetMangled()
Get accessor for the mangled name object.
A class that handles mangled names.
A collection class for Module objects.
A stream class that can stream formatted output to a file.
"lldb/Symbol/SymbolContextScope.h" Inherit from this if your object is part of a symbol context and c...
Defines a symbol context baton that can be handed other debug core functions.
#define LLDB_INVALID_ADDRESS
A class that represents a running process on the host machine.
llvm::SmallVector< CallSiteParameter, 0 > CallSiteParameterArray
A vector of CallSiteParameter.
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
std::shared_ptr< lldb_private::SupportFile > SupportFileSP
LanguageType
Programming language type.
std::shared_ptr< lldb_private::Disassembler > DisassemblerSP
std::shared_ptr< lldb_private::Module > ModuleSP
Represent the locations of a parameter at a call site, both in the caller and in the callee.
DWARFExpressionList LocationInCaller
DWARFExpressionList LocationInCallee
A mix in class that contains a generic user ID.