Go to the documentation of this file.
21 SymbolFileOnDemand::SymbolFileOnDemand(
22 std::unique_ptr<SymbolFile> &&symbol_file)
23 : m_sym_file_impl(std::move(symbol_file)) {}
53 LLDB_LOG(log,
"Language {0} would return if hydrated.", langType);
67 if (!(sdk == defaultValue))
104 llvm::DenseSet<lldb_private::SymbolFile *> &visited_symbol_files,
105 llvm::function_ref<
bool(
Module &)> lambda) {
112 return m_sym_file_impl->ForEachExternalModule(comp_unit, visited_symbol_files,
117 FileSpecList &support_files) {
119 "[{0}] {1} is not skipped: explicitly allowed to support breakpoint",
132 LLDB_LOG(log,
"Would return optimized if hydrated.");
151 std::vector<SourceModule> &imported_modules) {
156 std::vector<SourceModule> tmp_imported_modules;
160 LLDB_LOG(log,
"{0} imported modules would be parsed if hydrated.",
161 tmp_imported_modules.size());
193 LLDB_LOG(log,
"Type would be parsed for {0} if hydrated.", type_uid);
200 llvm::Optional<SymbolFile::ArrayInfo>
227 LLDB_LOG(log,
"CompilerDecl {0} would be parsed for {1} if hydrated.",
228 parsed_decl.
GetName(), type_uid);
267 SymbolContextItem resolve_scope,
274 return m_sym_file_impl->ResolveSymbolContext(so_addr, resolve_scope, sc);
285 return m_sym_file_impl->ResolveSymbolContext(src_location_spec, resolve_scope,
315 return m_sym_file_impl->FindGlobalVariables(regex, max_matches, variables);
325 LLDB_LOG(log,
"[{0}] {1} is skipped - fail to get symtab",
332 LLDB_LOG(log,
"[{0}] {1} is skipped - fail to find match in symtab",
336 LLDB_LOG(log,
"[{0}] {1} is NOT skipped - found match in symtab",
344 max_matches, variables);
348 bool include_inlines,
354 LLDB_LOG(log,
"[{0}] {1} is skipped - fail to get symtab",
358 std::vector<uint32_t> symbol_indexes;
362 if (symbol_indexes.empty()) {
363 LLDB_LOG(log,
"[{0}] {1} is skipped - fail to find match in symtab",
367 LLDB_LOG(log,
"[{0}] {1} is NOT skipped - found match in symtab",
374 return m_sym_file_impl->FindFunctions(regex, include_inlines, sc_list);
379 FunctionNameType name_type_mask,
bool include_inlines,
386 LLDB_LOG(log,
"[{0}] {1}({2}) is skipped - fail to get symtab",
393 if (sc_list_helper.
GetSize() == 0) {
394 LLDB_LOG(log,
"[{0}] {1}({2}) is skipped - fail to find match in symtab",
398 LLDB_LOG(log,
"[{0}] {1}({2}) is NOT skipped - found match in symtab",
405 return m_sym_file_impl->FindFunctions(name, parent_decl_ctx, name_type_mask,
406 include_inlines, sc_list);
411 std::vector<ConstString> &mangled_names) {
415 __FUNCTION__, scope_qualified_name);
418 return m_sym_file_impl->GetMangledNamesForFunction(scope_qualified_name,
425 llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
434 searched_symbol_files, types);
438 llvm::ArrayRef<CompilerContext> pattern,
LanguageSet languages,
439 llvm::DenseSet<SymbolFile *> &searched_symbol_files,
TypeMap &types) {
445 return m_sym_file_impl->FindTypes(pattern, languages, searched_symbol_files,
450 TypeClass type_mask,
TypeList &type_list) {
459 llvm::Expected<TypeSystem &>
463 LLDB_LOG(log,
"[{0}] {1} is skipped for language type {2}",
465 return llvm::make_error<llvm::StringError>(
466 "GetTypeSystemForLanguage is skipped by SymbolFileOnDemand",
467 llvm::inconvertibleErrorCode());
483 std::vector<std::unique_ptr<lldb_private::CallEdge>>
489 std::vector<std::unique_ptr<lldb_private::CallEdge>> call_edges =
491 if (call_edges.size() > 0) {
492 LLDB_LOG(log,
"{0} call edges would be parsed for {1} if hydrated.",
493 call_edges.size(), func_id.
GetID());
512 llvm::Expected<lldb::addr_t>
518 llvm::Expected<lldb::addr_t> stack_size =
521 LLDB_LOG(log,
"{0} stack size would return for symbol {1} if hydrated.",
522 *stack_size, symbol.
GetName());
572 LLDB_LOG(
GetLog(),
"[{0}] {1} is not skipped to support breakpoint hydration",
578 LLDB_LOG(
GetLog(),
"[{0}] {1} is not skipped to support breakpoint hydration",
void PreloadSymbols() override
size_t ParseBlocksRecursive(lldb_private::Function &func) override
bool ParseImportedModules(const lldb_private::SymbolContext &sc, std::vector< lldb_private::SourceModule > &imported_modules) override
lldb::UnwindPlanSP GetUnwindPlan(const Address &address, const RegisterInfoResolver &resolver) override
uint32_t CalculateAbilities() override
void DumpClangAST(lldb_private::Stream &s) override
lldb_private::StatsDuration::Duration GetDebugInfoIndexTime() override
Return the time it took to index the debug information in the object file.
std::chrono::duration< double > Duration
ConstString GetSymbolFileName()
llvm::Expected< lldb::addr_t > GetParameterStackSize(Symbol &symbol) override
Return the number of stack bytes taken up by the parameters to this function.
An abstraction for Xcode-style SDKs that works like ArchSpec.
LanguageType
Programming language type.
Represents a generic declaration such as a function declaration.
bool ParseSupportFiles(lldb_private::CompileUnit &comp_unit, lldb_private::FileSpecList &support_files) override
llvm::StringRef GetString() const
llvm::Expected< lldb_private::TypeSystem & > GetTypeSystemForLanguage(lldb::LanguageType language) override
Symtab * GetSymtab() override
size_t ParseVariablesForContext(const lldb_private::SymbolContext &sc) override
void FindFunctionSymbols(ConstString name, uint32_t name_type_mask, SymbolContextList &sc_list)
~SymbolFileOnDemand() override
size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override
Symbol * FindFirstSymbolWithNameAndType(ConstString name, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility)
lldb::LanguageType ParseLanguage(lldb_private::CompileUnit &comp_unit) override
uint32_t GetAbilities() override
Get a mask of what this symbol file supports for the object file that it was constructed with.
bool m_debug_info_enabled
void FindGlobalVariables(lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, lldb_private::VariableList &variables) override
ConstString GetName() const
lldb_private::CompilerDeclContext GetDeclContextContainingUID(lldb::user_id_t uid) override
uint64_t GetDebugInfoSize() override
Metrics gathering functions.
lldb_private::XcodeSDK ParseXcodeSDK(lldb_private::CompileUnit &comp_unit) override
Return the Xcode SDK comp_unit was compiled against.
uint32_t GetSize() const
Get accessor for a symbol context list size.
size_t ParseTypes(lldb_private::CompileUnit &comp_unit) override
void FindFunctions(lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx, lldb::FunctionNameType name_type_mask, bool include_inlines, lldb_private::SymbolContextList &sc_list) override
lldb_private::CompilerDeclContext FindNamespace(lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx) override
virtual CompilerDeclContext FindNamespace(ConstString name, const CompilerDeclContext &parent_decl_ctx)
void FindTypes(lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, llvm::DenseSet< lldb_private::SymbolFile * > &searched_symbol_files, lldb_private::TypeMap &types) override
string(SUBSTRING ${p} 10 -1 pStripped) if($
lldb_private::Type * ResolveTypeUID(lldb::user_id_t type_uid) override
Represents a generic declaration context in a program.
std::vector< std::unique_ptr< lldb_private::CallEdge > > ParseCallEdgesInFunction(UserID func_id) override
lldb::user_id_t GetID() const
Get accessor for the user ID.
ConstString GetName() const
void GetMangledNamesForFunction(const std::string &scope_qualified_name, std::vector< lldb_private::ConstString > &mangled_names) override
bool ForEachExternalModule(lldb_private::CompileUnit &, llvm::DenseSet< lldb_private::SymbolFile * > &, llvm::function_ref< bool(lldb_private::Module &)>) override
llvm::Optional< ArrayInfo > GetDynamicArrayInfoForUID(lldb::user_id_t type_uid, const lldb_private::ExecutionContext *exe_ctx) override
If type_uid points to an array type, return its characteristics.
uint32_t ResolveSymbolContext(const lldb_private::Address &so_addr, lldb::SymbolContextItem resolve_scope, lldb_private::SymbolContext &sc) override
@ eLanguageTypeUnknown
Unknown or invalid language value.
lldb_private::CompilerDecl GetDeclForUID(lldb::user_id_t uid) override
void InitializeObject() override
Initialize the SymbolFile object.
bool ParseIsOptimized(lldb_private::CompileUnit &comp_unit) override
virtual llvm::Expected< lldb::addr_t > GetParameterStackSize(Symbol &symbol)
Return the number of stack bytes taken up by the parameters to this function.
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
lldb_private::CompilerDeclContext GetDeclContextForUID(lldb::user_id_t uid) override
lldb_private::StatsDuration::Duration GetDebugInfoParseTime() override
Return the time taken to parse the debug information.
Generic representation of a type in a programming language.
void ParseDeclsForContext(lldb_private::CompilerDeclContext decl_ctx) override
void Dump(lldb_private::Stream &s) override
A class that represents a running process on the host machine.
uint32_t AppendSymbolIndexesMatchingRegExAndType(const RegularExpression ®ex, lldb::SymbolType symbol_type, std::vector< uint32_t > &indexes)
A SmallBitVector that represents a set of source languages (lldb::LanguageType).
std::recursive_mutex & GetModuleMutex() const override
Symbols file subclasses should override this to return the Module that owns the TypeSystem that this ...
void SetLoadDebugInfoEnabled() override
Specify debug info should be loaded.
uint32_t GetNumCompileUnits() override
lldb::CompUnitSP GetCompileUnitAtIndex(uint32_t idx) override
void GetTypes(lldb_private::SymbolContextScope *sc_scope, lldb::TypeClass type_mask, lldb_private::TypeList &type_list) override
bool ParseDebugMacros(lldb_private::CompileUnit &comp_unit) override
std::unique_ptr< SymbolFile > m_sym_file_impl
bool CompleteType(lldb_private::CompilerType &compiler_type) override
bool ParseLineTable(lldb_private::CompileUnit &comp_unit) override