|
LLDB mainline
|
A class that describes a function. More...
#include "lldb/Symbol/Function.h"
Public Types | |
| using | SourceRange = Range<uint32_t, uint32_t> |
Public Member Functions | |
| Function (CompileUnit *comp_unit, lldb::user_id_t func_uid, lldb::user_id_t func_type_uid, const Mangled &mangled, Type *func_type, Address address, AddressRanges ranges) | |
| Construct with a compile unit, function UID, function type UID, optional mangled name, function type, and a section offset based address range. | |
| ~Function () override | |
| Destructor. | |
| void | CalculateSymbolContext (SymbolContext *sc) override |
| Reconstruct the object's symbol context into sc. | |
| lldb::ModuleSP | CalculateSymbolContextModule () override |
| CompileUnit * | CalculateSymbolContextCompileUnit () override |
| Function * | CalculateSymbolContextFunction () override |
| AddressRanges | GetAddressRanges () |
| const Address & | GetAddress () const |
| Return the address of the function (its entry point). | |
| bool | GetRangeContainingLoadAddress (lldb::addr_t load_addr, Target &target, AddressRange &range) |
| lldb::LanguageType | GetLanguage () const |
| void | GetStartLineSourceInfo (SupportFileNSP &source_file_sp, uint32_t &line_no) |
| Find the file and line number of the source location of the start of the function. | |
| llvm::Expected< std::pair< SupportFileNSP, SourceRange > > | GetSourceInfo () |
| Find the file and line number range of the function. | |
| llvm::ArrayRef< std::unique_ptr< CallEdge > > | GetCallEdges () |
| Get the outgoing call edges from this function, sorted by their return PC addresses (in increasing order). | |
| llvm::ArrayRef< std::unique_ptr< CallEdge > > | GetTailCallingEdges () |
| Get the outgoing tail-calling edges from this function. | |
| 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, or return nullptr. | |
| Block & | GetBlock (bool can_create) |
| Get accessor for the block list. | |
| CompileUnit * | GetCompileUnit () |
| Get accessor for the compile unit that owns this function. | |
| const CompileUnit * | GetCompileUnit () const |
| Get const accessor for the compile unit that owns this function. | |
| void | GetDescription (Stream *s, lldb::DescriptionLevel level, Target *target) |
| DWARFExpressionList & | GetFrameBaseExpression () |
| Get accessor for the frame base location. | |
| const DWARFExpressionList & | GetFrameBaseExpression () const |
| Get const accessor for the frame base location. | |
| ConstString | GetName () const |
| ConstString | GetNameNoArguments () const |
| ConstString | GetDisplayName () const |
| const Mangled & | GetMangled () const |
| CompilerDeclContext | GetDeclContext () |
| Get the DeclContext for this function, if available. | |
| std::vector< CompilerContext > | GetCompilerContext () |
| Get the CompilerContext for this function, if available. | |
| Type * | GetType () |
| Get accessor for the type that describes the function return value type, and parameter types. | |
| const Type * | GetType () const |
| Get const accessor for the type that describes the function return value type, and parameter types. | |
| CompilerType | GetCompilerType () |
| uint32_t | GetPrologueByteSize () |
| Get the size of the prologue instructions for this function. | |
| void | Dump (Stream *s, bool show_context) const |
| Dump a description of this object to a Stream. | |
| void | DumpSymbolContext (Stream *s) override |
| Dump the object's symbol context to the stream s. | |
| bool | GetIsOptimized () |
| Get whether compiler optimizations were enabled for this function. | |
| bool | IsTopLevelFunction () |
| Get whether this function represents a 'top-level' function. | |
| lldb::DisassemblerSP | GetInstructions (const ExecutionContext &exe_ctx, const char *flavor, bool force_live_memory=false) |
| bool | GetDisassembly (const ExecutionContext &exe_ctx, const char *flavor, Stream &strm, bool force_live_memory=false) |
| Public Member Functions inherited from lldb_private::UserID | |
| UserID (lldb::user_id_t uid=LLDB_INVALID_UID) | |
| Construct with optional user ID. | |
| ~UserID ()=default | |
| Destructor. | |
| void | Clear () |
| Clears the object state. | |
| lldb::user_id_t | GetID () const |
| Get accessor for the user ID. | |
| void | SetID (lldb::user_id_t uid) |
| Set accessor for the user ID. | |
| Public Member Functions inherited from lldb_private::SymbolContextScope | |
| virtual | ~SymbolContextScope ()=default |
| virtual Block * | CalculateSymbolContextBlock () |
| virtual Symbol * | CalculateSymbolContextSymbol () |
Protected Types | |
| enum | { flagsCalculatedPrologueSize = (1 << 0) } |
Protected Attributes | |
| CompileUnit * | m_comp_unit |
| The compile unit that owns this function. | |
| lldb::user_id_t | m_type_uid |
| The user ID of for the prototype Type for this function. | |
| Type * | m_type |
| The function prototype type for this function that includes the function info (FunctionInfo), return type and parameters. | |
| Mangled | m_mangled |
| The mangled function name if any. | |
| Block | m_block |
| All lexical blocks contained in this function. | |
| Address | m_address |
| The address (entry point) of the function. | |
| DWARFExpressionList | m_frame_base |
| The frame base expression for variables that are relative to the frame pointer. | |
| Flags | m_flags |
| uint32_t | m_prologue_byte_size |
| Compute the prologue size once and cache it. | |
| std::mutex | m_call_edges_lock |
| Exclusive lock that controls read/write access to m_call_edges and m_call_edges_resolved. | |
| bool | m_call_edges_resolved = false |
| Whether call site info has been parsed. | |
| std::vector< std::unique_ptr< CallEdge > > | m_call_edges |
| Outgoing call edges. | |
| Protected Attributes inherited from lldb_private::UserID | |
| lldb::user_id_t | m_uid |
| The user ID that uniquely identifies an object. | |
Private Member Functions | |
| Function (const Function &)=delete | |
| const Function & | operator= (const Function &)=delete |
A class that describes a function.
Functions belong to CompileUnit objects (Function::m_comp_unit), have unique user IDs (Function::UserID), know how to reconstruct their symbol context (Function::SymbolContextScope), have a specific function type (Function::m_type_uid), have a simple method name (FunctionInfo::m_name), be declared at a specific location (FunctionInfo::m_declaration), possibly have mangled names (Function::m_mangled), an optional return type (Function::m_type), and contains lexical blocks (Function::m_blocks).
The function information is split into a few pieces:
The abstract information is found in the function type (Type) that describes a function information, return type and parameter types.
The concrete information is the address range information and specific locations for an instance of this function.
Definition at line 376 of file Function.h.
| using lldb_private::Function::SourceRange = Range<uint32_t, uint32_t> |
Definition at line 451 of file Function.h.
|
protected |
| Enumerator | |
|---|---|
| flagsCalculatedPrologueSize | Whether we already tried to calculate the prologue size. |
Definition at line 604 of file Function.h.
| Function::Function | ( | CompileUnit * | comp_unit, |
| lldb::user_id_t | func_uid, | ||
| lldb::user_id_t | func_type_uid, | ||
| const Mangled & | mangled, | ||
| Type * | func_type, | ||
| Address | address, | ||
| AddressRanges | ranges ) |
Construct with a compile unit, function UID, function type UID, optional mangled name, function type, and a section offset based address range.
| [in] | comp_unit | The compile unit to which this function belongs. |
| [in] | func_uid | The UID for this function. This value is provided by the SymbolFile plug-in and can be any value that allows the plug-in to quickly find and parse more detailed information when and if more information is needed. |
| [in] | func_type_uid | The type UID for the function Type to allow for lazy type parsing from the debug information. |
| [in] | mangled | The optional mangled name for this function. If empty, there is no mangled information. |
| [in] | func_type | The optional function type. If NULL, the function type will be parsed on demand when accessed using the Function::GetType() function by asking the SymbolFile plug-in to get the type for func_type_uid. |
| [in] | range | The section offset based address for this function. |
Definition at line 255 of file Function.cpp.
References m_address, m_block, m_comp_unit, m_mangled, m_prologue_byte_size, m_type, m_type_uid, and lldb_private::UserID::UserID().
Referenced by CalculateSymbolContextFunction(), Function(), operator=(), and ~Function().
|
overridedefault |
Destructor.
References Function().
|
privatedelete |
References Function().
|
overridevirtual |
Reconstruct the object's symbol context into sc.
The object should fill in as much of the SymbolContext as it can so function calls that require a symbol context can be made for the given object.
| [out] | sc | A symbol context object pointer that gets filled in. |
Implements lldb_private::SymbolContextScope.
Definition at line 447 of file Function.cpp.
References lldb_private::SymbolContext::function, and m_comp_unit.
Referenced by GetType(), and lldb_private::StackFrameList::SynthesizeTailCallFrames().
|
overridevirtual |
Reimplemented from lldb_private::SymbolContextScope.
Definition at line 459 of file Function.cpp.
References GetCompileUnit().
|
overridevirtual |
Reimplemented from lldb_private::SymbolContextScope.
Definition at line 463 of file Function.cpp.
References Function().
|
overridevirtual |
Reimplemented from lldb_private::SymbolContextScope.
Definition at line 452 of file Function.cpp.
References GetCompileUnit(), lldb_private::ModuleChild::GetModule(), and m_address.
Referenced by GetBlock(), GetCompilerContext(), GetDeclContext(), and lldb_private::plugin::dwarf::SymbolFileDWARF::GetFunction().
Dump a description of this object to a Stream.
Dump a description of the contents of this object to the supplied stream s.
| [in] | s | The stream to which to dump the object description. |
| [in] | show_context | If true, variables will dump their symbol context information. |
Definition at line 429 of file Function.cpp.
References lldb_private::Stream::EOL(), lldb_private::Stream::Indent(), LLDB_INVALID_UID, m_address, m_block, m_mangled, m_type, m_type_uid, lldb_private::Stream::Printf(), and lldb_private::UserID::UserID().
|
overridevirtual |
Dump the object's symbol context to the stream s.
The object should dump its symbol context to the stream s. This function is widely used in the DumpDebug and verbose output for lldb objects.
| [in] | s | The stream to which to dump the object's symbol context. |
Implements lldb_private::SymbolContextScope.
Definition at line 499 of file Function.cpp.
References lldb_private::UserID::GetID(), m_comp_unit, and lldb_private::Stream::Printf().
Referenced by lldb_private::ClangExpressionDeclMap::AddOneFunction(), and lldb_private::Block::DumpSymbolContext().
|
inline |
Return the address of the function (its entry point).
This address is also used as a base address for relocation of function-scope entities (blocks and variables).
Definition at line 429 of file Function.h.
References m_address.
Referenced by lldb_private::BreakpointResolver::AddLocation(), lldb_private::ClangExpressionDeclMap::AddOneFunction(), lldb_private::Block::AddRange(), DynamicLoaderPOSIXDYLD::AlwaysRelyOnEHUnwindInfo(), lldb_private::DynamicLoaderDarwin::AlwaysRelyOnEHUnwindInfo(), lldb_private::VariableAnnotator::AnnotateStructured(), lldb_private::npdb::SymbolFileNativePDB::CreateBlock(), lldb_private::npdb::SymbolFileNativePDB::CreateLocalVariable(), DumpAddressOffsetFromFunction(), lldb_private::Variable::DumpLocations(), lldb_private::Module::FindFunctions(), lldb_private::SearchFilter::FunctionPasses(), lldb_private::ArchitectureMips::GetBreakableLoadAddress(), lldb::SBBlock::GetDescription(), lldb_private::Block::GetDescription(), GetInstructions(), lldb_private::CallEdge::GetLoadAddress(), GetPrologueByteSize(), lldb_private::Block::GetRangeAtIndex(), lldb_private::Block::GetRangeContainingAddress(), lldb_private::Block::GetRangeIndexContainingAddress(), lldb_private::Block::GetRanges(), lldb_private::Block::GetStartAddress(), GetStartLineSourceInfo(), lldb_private::Variable::LocationIsValidForAddress(), lldb_private::Variable::LocationIsValidForFrame(), lldb_private::DWARFExpressionList::MatchesOperand(), lldb_private::breakpad::SymbolFileBreakpad::ParseBlocksRecursive(), RemoveFunctionsWithModuleNotEqualTo(), lldb_private::ThreadPlanStepInRange::ShouldStop(), and lldb_private::ValueObjectVariable::UpdateValue().
|
inline |
Definition at line 424 of file Function.h.
References m_block.
Referenced by lldb_private::Disassembler::Disassemble(), CommandObjectThreadUntil::DoExecute(), lldb_private::CommandObjectDisassemble::GetCurrentFunctionRanges(), GetInstructions(), GetSourceInfo(), and lldb_private::StackFrame::GuessValueForRegisterAndOffset().
Get accessor for the block list.
Definition at line 379 of file Function.cpp.
References CalculateSymbolContextModule(), GetName(), m_block, m_comp_unit, and lldb_private::Debugger::ReportError().
Referenced by GetCallEdges(), GetFunctionVariableList(), GetFunctionVariableList(), InferArtificialCoroType(), lldb_private::breakpad::SymbolFileBreakpad::ParseBlocksRecursive(), lldb_private::npdb::SymbolFileNativePDB::ParseBlocksRecursive(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseBlocksRecursive(), SymbolFilePDB::ParseBlocksRecursive(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariableDIE(), SymbolFilePDB::ParseVariableForPDBData(), SymbolFilePDB::ParseVariables(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariablesForContext(), SymbolFilePDB::ParseVariablesForContext(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseVariablesInFunctionContextRecursive(), lldb_private::plugin::dwarf::SymbolFileDWARF::ResolveFunction(), lldb_private::plugin::dwarf::SymbolFileDWARF::ResolveFunctionAndBlock(), lldb_private::CompileUnit::ResolveSymbolContext(), and DWARFASTParserClang::UpdateSymbolContextScopeForType().
| CallEdge * Function::GetCallEdgeForReturnAddress | ( | lldb::addr_t | return_pc, |
| Target & | target ) |
Get the outgoing call edge from this function which has the given return address return_pc, or return nullptr.
Note that this will not return a tail-calling edge.
Definition at line 364 of file Function.cpp.
References GetCallEdges().
Referenced by Evaluate_DW_OP_entry_value(), and FindInterveningFrames().
| llvm::ArrayRef< std::unique_ptr< CallEdge > > Function::GetCallEdges | ( | ) |
Get the outgoing call edges from this function, sorted by their return PC addresses (in increasing order).
Definition at line 327 of file Function.cpp.
References GetBlock(), GetDisplayName(), lldb_private::UserID::GetID(), lldb_private::GetLog(), lldb_private::Block::GetSymbolFile(), LLDB_LOG, m_call_edges, m_call_edges_lock, m_call_edges_resolved, lldb_private::SymbolFile::ParseCallEdgesInFunction(), and lldb_private::Step.
Referenced by FindInterveningFrames(), GetCallEdgeForReturnAddress(), and GetTailCallingEdges().
| std::vector< CompilerContext > Function::GetCompilerContext | ( | ) |
Get the CompilerContext for this function, if available.
Definition at line 535 of file Function.cpp.
References CalculateSymbolContextModule(), and lldb_private::UserID::GetID().
Referenced by GetDescription().
| CompilerType Function::GetCompilerType | ( | ) |
Definition at line 563 of file Function.cpp.
References lldb_private::Type::GetFullCompilerType(), and GetType().
Referenced by lldb_private::Thread::ReturnFromFrame(), and ValueObjectVTableChild::UpdateValue().
| CompileUnit * Function::GetCompileUnit | ( | ) |
Get accessor for the compile unit that owns this function.
Definition at line 394 of file Function.cpp.
References m_comp_unit.
Referenced by lldb_private::ClangExpressionDeclMap::AddOneFunction(), CalculateSymbolContextCompileUnit(), CalculateSymbolContextModule(), lldb::SBBlock::operator==(), lldb_private::breakpad::SymbolFileBreakpad::ParseBlocksRecursive(), lldb_private::plugin::dwarf::SymbolFileDWARF::ParseBlocksRecursive(), and lldb_private::plugin::dwarf::SymbolFileDWARFDebugMap::ParseBlocksRecursive().
| const CompileUnit * Function::GetCompileUnit | ( | ) | const |
Get const accessor for the compile unit that owns this function.
Definition at line 396 of file Function.cpp.
References m_comp_unit.
| CompilerDeclContext Function::GetDeclContext | ( | ) |
Get the DeclContext for this function, if available.
Definition at line 528 of file Function.cpp.
References CalculateSymbolContextModule(), and lldb_private::UserID::GetID().
Referenced by lldb_private::ClangExpressionDeclMap::AddOneFunction(), and lldb_private::ClangExpressionDeclMap::SearchFunctionsInSymbolContexts().
| void Function::GetDescription | ( | Stream * | s, |
| lldb::DescriptionLevel | level, | ||
| Target * | target ) |
Definition at line 398 of file Function.cpp.
References lldb_private::Stream::AsRawOstream(), lldb_private::AddressRange::Dump(), lldb_private::Address::DumpStyleFileAddress, lldb_private::Address::DumpStyleLoadAddress, lldb_private::Address::DumpStyleModuleWithFileAddress, lldb::eDescriptionLevelVerbose, GetCompilerContext(), GetName(), m_block, m_mangled, and lldb_private::UserID::UserID().
| bool Function::GetDisassembly | ( | const ExecutionContext & | exe_ctx, |
| const char * | flavor, | ||
| Stream & | strm, | ||
| bool | force_live_memory = false ) |
Definition at line 477 of file Function.cpp.
References GetInstructions().
| ConstString Function::GetDisplayName | ( | ) | const |
Definition at line 524 of file Function.cpp.
References m_mangled.
Referenced by FindInterveningFrames(), GetCallEdges(), lldb_private::StackFrame::GetDisplayFunctionName(), and lldb_private::StackFrameList::SynthesizeTailCallFrames().
|
inline |
Get accessor for the frame base location.
Definition at line 496 of file Function.h.
References m_frame_base.
|
inline |
Get const accessor for the frame base location.
Definition at line 502 of file Function.h.
References m_frame_base.
| lldb::DisassemblerSP Function::GetInstructions | ( | const ExecutionContext & | exe_ctx, |
| const char * | flavor, | ||
| bool | force_live_memory = false ) |
Definition at line 465 of file Function.cpp.
References lldb_private::Disassembler::DisassembleRange(), GetAddress(), GetAddressRanges(), lldb_private::Address::GetModule(), lldb_private::ExecutionContext::GetTargetRef(), and lldb_private::ExecutionContext::HasTargetScope().
Referenced by CalculateDisass(), and GetDisassembly().
| bool Function::GetIsOptimized | ( | ) |
Get whether compiler optimizations were enabled for this function.
The debug information may provide information about whether this function was compiled with optimization or not. In this case, "optimized" means that the debug experience may be difficult for the user to understand. Variables may not be available when the developer would expect them, stepping through the source lines in the function may appear strange, etc.
Definition at line 504 of file Function.cpp.
References m_comp_unit.
Referenced by lldb_private::Process::PrintWarningOptimization().
| lldb::LanguageType Function::GetLanguage | ( | ) | const |
Definition at line 720 of file Function.cpp.
References lldb::eLanguageTypeUnknown, m_comp_unit, and m_mangled.
Referenced by HandleFunctionNameWithArgs(), and IsTopLevelFunction().
|
inline |
Definition at line 510 of file Function.h.
References m_mangled.
Referenced by lldb_private::ClangExpressionDeclMap::AddOneFunction(), lldb_private::Debugger::FormatDisassemblerAddress(), lldb_private::BreakpointLocation::GetDescription(), lldb_private::StackFrame::GuessLanguage(), and lldb_private::SymbolContextSpecifier::SymbolContextMatches().
| ConstString Function::GetName | ( | ) | const |
Definition at line 731 of file Function.cpp.
References m_mangled.
Referenced by Evaluate_DW_OP_entry_value(), GetBlock(), lldb_private::BreakpointLocation::GetDescription(), GetDescription(), lldb_private::StackFrame::GetFunctionName(), GetSourceInfo(), GetSymbolOrFunctionName(), lldb_private::ClangExpressionDeclMap::SearchFunctionsInSymbolContexts(), and SymbolContextsMightBeEquivalent().
| ConstString Function::GetNameNoArguments | ( | ) | const |
Definition at line 735 of file Function.cpp.
References lldb_private::Mangled::ePreferDemangledWithoutArguments, and m_mangled.
| uint32_t Function::GetPrologueByteSize | ( | ) |
Get the size of the prologue instructions for this function.
The "prologue" instructions include any instructions given line number 0 immediately following the prologue end.
Definition at line 570 of file Function.cpp.
References lldb_private::LineTable::FindLineEntryByAddress(), flagsCalculatedPrologueSize, GetAddress(), lldb_private::AddressRange::GetBaseAddress(), lldb_private::AddressRange::GetByteSize(), lldb_private::Address::GetFileAddress(), lldb_private::LineTable::GetLineEntryAtIndex(), lldb_private::LineTable::GetSize(), lldb_private::LineEntry::is_prologue_end, lldb_private::LineEntry::line, LLDB_INVALID_ADDRESS, m_address, m_block, m_comp_unit, m_flags, m_prologue_byte_size, lldb_private::LineEntry::range, UINT32_MAX, and UNUSED_IF_ASSERT_DISABLED.
Referenced by lldb_private::BreakpointResolver::AddLocation(), lldb_private::Symbol::GetPrologueByteSize(), and lldb_private::ThreadPlanStepInRange::ShouldStop().
|
inline |
Definition at line 431 of file Function.h.
References m_block.
Referenced by CommandObjectThreadUntil::DoExecute(), lldb_private::StackFrame::GuessValueForRegisterAndOffset(), and lldb::SBThread::StepOverUntil().
| llvm::Expected< std::pair< SupportFileNSP, Function::SourceRange > > Function::GetSourceInfo | ( | ) |
Find the file and line number range of the function.
Definition at line 301 of file Function.cpp.
References lldb_private::SupportFile::eEqualFileSpecAndChecksumIfSet, lldb_private::LineEntry::file_sp, GetAddressRanges(), lldb_private::LineTable::GetLineEntryAtIndex(), lldb_private::LineTable::GetLineEntryIndexRange(), GetName(), GetStartLineSourceInfo(), lldb_private::LineEntry::line, and m_comp_unit.
Referenced by CommandObjectSourceList::DisplayFunctionSource().
| void Function::GetStartLineSourceInfo | ( | SupportFileNSP & | source_file_sp, |
| uint32_t & | line_no ) |
Find the file and line number of the source location of the start of the function.
This will use the declaration if present and fall back on the line table if that fails. So there may NOT be a line table entry for this source file/line combo.
| [out] | source_file | The source file. |
| [out] | line_no | The line number. |
Definition at line 272 of file Function.cpp.
References lldb_private::LineEntry::file_sp, lldb_private::LineTable::FindLineEntryByAddress(), GetAddress(), GetType(), lldb_private::LineEntry::line, m_comp_unit, and m_type.
Referenced by lldb_private::BreakpointResolverFileLine::FilterContexts(), lldb_private::Disassembler::GetFunctionDeclLineEntry(), GetSourceInfo(), and lldb_private::Disassembler::PrintInstructions().
| llvm::ArrayRef< std::unique_ptr< CallEdge > > Function::GetTailCallingEdges | ( | ) |
Get the outgoing tail-calling edges from this function.
If none exist, return std::nullopt.
Definition at line 357 of file Function.cpp.
References GetCallEdges().
Referenced by Evaluate_DW_OP_entry_value(), and FindInterveningFrames().
| Type * Function::GetType | ( | ) |
Get accessor for the type that describes the function return value type, and parameter types.
Definition at line 542 of file Function.cpp.
References CalculateSymbolContext(), m_type, m_type_uid, lldb_private::SymbolContext::module_sp, and lldb_private::SymbolFile::ResolveTypeUID().
Referenced by lldb_private::ClangExpressionDeclMap::AddOneFunction(), lldb_private::Block::AddRange(), GetCompilerType(), GetStartLineSourceInfo(), lldb_private::Thread::ReturnFromFrame(), and lldb_private::ClangExpressionDeclMap::SearchFunctionsInSymbolContexts().
| const Type * Function::GetType | ( | ) | const |
Get const accessor for the type that describes the function return value type, and parameter types.
Definition at line 561 of file Function.cpp.
References m_type.
| bool Function::IsTopLevelFunction | ( | ) |
Get whether this function represents a 'top-level' function.
The concept of a top-level function is language-specific, mostly meant to represent the notion of scripting-style code that has global visibility of the variables/symbols/functions/... defined within the containing file/module
If stopped in a top-level function, LLDB will expose global variables as-if locals in the 'frame variable' command
Definition at line 515 of file Function.cpp.
References lldb_private::Language::FindPlugin(), and GetLanguage().
References Function().
|
protected |
The address (entry point) of the function.
Definition at line 627 of file Function.h.
Referenced by CalculateSymbolContextModule(), Dump(), Function(), GetAddress(), and GetPrologueByteSize().
|
protected |
All lexical blocks contained in this function.
Definition at line 624 of file Function.h.
Referenced by Dump(), Function(), GetAddressRanges(), GetBlock(), GetDescription(), GetPrologueByteSize(), and GetRangeContainingLoadAddress().
|
protected |
|
protected |
Exclusive lock that controls read/write access to m_call_edges and m_call_edges_resolved.
Definition at line 640 of file Function.h.
Referenced by GetCallEdges().
|
protected |
Whether call site info has been parsed.
Definition at line 643 of file Function.h.
Referenced by GetCallEdges().
|
protected |
The compile unit that owns this function.
Definition at line 610 of file Function.h.
Referenced by CalculateSymbolContext(), DumpSymbolContext(), Function(), GetBlock(), GetCompileUnit(), GetCompileUnit(), GetIsOptimized(), GetLanguage(), GetPrologueByteSize(), GetSourceInfo(), and GetStartLineSourceInfo().
|
protected |
Definition at line 633 of file Function.h.
Referenced by GetPrologueByteSize().
|
protected |
The frame base expression for variables that are relative to the frame pointer.
Definition at line 631 of file Function.h.
Referenced by GetFrameBaseExpression(), and GetFrameBaseExpression().
|
protected |
The mangled function name if any.
If empty, there is no mangled information.
Definition at line 621 of file Function.h.
Referenced by Dump(), Function(), GetDescription(), GetDisplayName(), GetLanguage(), GetMangled(), GetName(), and GetNameNoArguments().
|
protected |
Compute the prologue size once and cache it.
Definition at line 636 of file Function.h.
Referenced by Function(), and GetPrologueByteSize().
|
protected |
The function prototype type for this function that includes the function info (FunctionInfo), return type and parameters.
Definition at line 617 of file Function.h.
Referenced by Dump(), Function(), GetStartLineSourceInfo(), GetType(), and GetType().
|
protected |
The user ID of for the prototype Type for this function.
Definition at line 613 of file Function.h.
Referenced by Dump(), Function(), and GetType().