|
LLDB mainline
|
"lldb/Expression/ExternalSymbolResolver.h" Finds the load addresses of symbols that an expression refers to but does not define. More...
#include <ExternalSymbolResolver.h>
Public Member Functions | |
| ExternalSymbolResolver (const SymbolContext &sym_ctx, bool strip_underscore) | |
| Constructor. | |
| void | AppendPreferredSymbolContexts (SymbolContextList const &contexts) |
Search the modules of contexts before any others, except for the module of the symbol context this resolver was constructed with. | |
| lldb::addr_t | FindSymbol (ConstString name, bool &missing_weak) |
Find the load address of name. | |
Private Member Functions | |
| void | CollectCandidateCNames (std::vector< ConstString > &C_names, ConstString name) |
| void | CollectCandidateCPlusPlusNames (std::vector< ConstString > &CPP_names, const std::vector< ConstString > &C_names, const SymbolContext &sc) |
| lldb::addr_t | FindInSymbols (const std::vector< ConstString > &names, const lldb_private::SymbolContext &sc, bool &symbol_was_missing_weak) |
| lldb::addr_t | FindInRuntimes (const std::vector< ConstString > &names, const lldb_private::SymbolContext &sc) |
| lldb::addr_t | FindInUserDefinedSymbols (const std::vector< ConstString > &names, const lldb_private::SymbolContext &sc) |
Private Attributes | |
| SymbolContext | m_sym_ctx |
| Used for symbol lookups. | |
| bool | m_strip_underscore |
| True for platforms where global symbols have a _ prefix. | |
| ModuleList | m_preferred_modules |
| Any Module in this list will be used for symbol/function lookup before any other module (except for the module corresponding to the current frame). | |
"lldb/Expression/ExternalSymbolResolver.h" Finds the load addresses of symbols that an expression refers to but does not define.
An expression's IR refers by name to functions and variables that live outside the expression's own module. Finding the address for such a name is not a simple lookup: the name may be an LLDB function call label, it may need alternate manglings tried, and it may be satisfied by the target's images, by a language runtime, or by a symbol that a previous expression defined (see Target::GetPersistentSymbol).
Definition at line 31 of file ExternalSymbolResolver.h.
| ExternalSymbolResolver::ExternalSymbolResolver | ( | const SymbolContext & | sym_ctx, |
| bool | strip_underscore ) |
Constructor.
| [in] | sym_ctx | The symbol context to search from. Its module, if any, is searched before all others. |
| [in] | strip_underscore | True for platforms where global symbols have a _ prefix, in which case the name with that prefix removed is also tried. |
Definition at line 28 of file ExternalSymbolResolver.cpp.
References m_preferred_modules, m_strip_underscore, and m_sym_ctx.
|
inline |
Search the modules of contexts before any others, except for the module of the symbol context this resolver was constructed with.
Definition at line 46 of file ExternalSymbolResolver.h.
References m_preferred_modules.
|
private |
Definition at line 33 of file ExternalSymbolResolver.cpp.
References lldb_private::ConstString::GetCString(), lldb_private::ConstString::GetStringRef(), and m_strip_underscore.
Referenced by FindSymbol().
|
private |
Definition at line 40 of file ExternalSymbolResolver.cpp.
References lldb::eLanguageTypeC_plus_plus, and lldb_private::Language::FindPlugin().
Referenced by FindSymbol().
|
private |
Definition at line 280 of file ExternalSymbolResolver.cpp.
References LLDB_INVALID_ADDRESS, and lldb_private::SymbolContext::target_sp.
Referenced by FindSymbol().
|
private |
Definition at line 181 of file ExternalSymbolResolver.cpp.
References lldb::eSymbolTypeAny, lldb_private::ModuleList::FindFunctions(), lldb_private::ModuleList::FindSymbolsWithNameAndType(), LoadAddressResolver::GetBestInternalLoadAddress(), lldb_private::Target::GetImages(), lldb_private::ModuleList::GetModuleAtIndex(), lldb_private::ModuleList::GetSize(), lldb_private::ModuleFunctionSearchOptions::include_inlines, lldb_private::ModuleFunctionSearchOptions::include_symbols, LLDB_INVALID_ADDRESS, m_preferred_modules, lldb_private::SymbolContext::module_sp, lldb_private::Target::ModuleIsExcludedForUnconstrainedSearches(), lldb_private::ModuleList::Remove(), LoadAddressResolver::Resolve(), and lldb_private::SymbolContext::target_sp.
Referenced by FindSymbol().
|
private |
Definition at line 306 of file ExternalSymbolResolver.cpp.
References LLDB_INVALID_ADDRESS, and lldb_private::SymbolContext::target_sp.
Referenced by FindSymbol().
| lldb::addr_t ExternalSymbolResolver::FindSymbol | ( | lldb_private::ConstString | name, |
| bool & | missing_weak ) |
Find the load address of name.
| [out] | missing_weak | Set to true if name was only found as a weak undefined symbol, in which case the returned address is 0. |
name was not found. Definition at line 321 of file ExternalSymbolResolver.cpp.
References CollectCandidateCNames(), CollectCandidateCPlusPlusNames(), lldb_private::Expressions, FindInRuntimes(), FindInSymbols(), FindInUserDefinedSymbols(), lldb_private::FunctionCallLabel::fromString(), lldb_private::FunctionCallLabelPrefix, lldb_private::GetLog(), lldb_private::ConstString::GetStringRef(), LLDB_INVALID_ADDRESS, LLDB_LOG_ERROR, m_sym_ctx, ResolveFunctionCallLabel(), and lldb_private::ConstString::SetString().
|
private |
Any Module in this list will be used for symbol/function lookup before any other module (except for the module corresponding to the current frame).
Definition at line 88 of file ExternalSymbolResolver.h.
Referenced by AppendPreferredSymbolContexts(), ExternalSymbolResolver(), and FindInSymbols().
|
private |
True for platforms where global symbols have a _ prefix.
Definition at line 82 of file ExternalSymbolResolver.h.
Referenced by CollectCandidateCNames(), and ExternalSymbolResolver().
|
private |
Used for symbol lookups.
Definition at line 80 of file ExternalSymbolResolver.h.
Referenced by ExternalSymbolResolver(), and FindSymbol().