23 std::unique_ptr<SymbolFile> &&symbol_file)
24 : m_sym_file_impl(std::move(symbol_file)) {}
54 LLDB_LOG(log,
"Language {0} would return if hydrated.", langType);
68 if (!(sdk == defaultValue))
105 llvm::DenseSet<lldb_private::SymbolFile *> &visited_symbol_files,
106 llvm::function_ref<
bool(
Module &)> lambda) {
113 return m_sym_file_impl->ForEachExternalModule(comp_unit, visited_symbol_files,
120 "[{0}] {1} is not skipped: explicitly allowed to support breakpoint",
133 LLDB_LOG(log,
"Would return optimized if hydrated.");
152 std::vector<SourceModule> &imported_modules) {
157 std::vector<SourceModule> tmp_imported_modules;
161 LLDB_LOG(log,
"{0} imported modules would be parsed if hydrated.",
162 tmp_imported_modules.size());
194 LLDB_LOG(log,
"Type would be parsed for {0} if hydrated.", type_uid);
201std::optional<SymbolFile::ArrayInfo>
228 LLDB_LOG(log,
"CompilerDecl {0} would be parsed for {1} if hydrated.",
229 parsed_decl.
GetName(), type_uid);
268 SymbolContextItem resolve_scope,
275 return m_sym_file_impl->ResolveSymbolContext(so_addr, resolve_scope, sc);
295 return m_sym_file_impl->ResolveSymbolContext(src_location_spec, resolve_scope,
318 uint32_t max_matches,
325 return m_sym_file_impl->FindGlobalVariables(regex, max_matches, variables);
335 LLDB_LOG(log,
"[{0}] {1} is skipped - fail to get symtab",
342 LLDB_LOG(log,
"[{0}] {1} is skipped - fail to find match in symtab",
346 LLDB_LOG(log,
"[{0}] {1} is NOT skipped - found match in symtab",
354 max_matches, variables);
358 bool include_inlines,
364 LLDB_LOG(log,
"[{0}] {1} is skipped - fail to get symtab",
368 std::vector<uint32_t> symbol_indexes;
372 if (symbol_indexes.empty()) {
373 LLDB_LOG(log,
"[{0}] {1} is skipped - fail to find match in symtab",
377 LLDB_LOG(log,
"[{0}] {1} is NOT skipped - found match in symtab",
384 return m_sym_file_impl->FindFunctions(regex, include_inlines, sc_list);
398 LLDB_LOG(log,
"[{0}] {1}({2}) is skipped - fail to get symtab",
405 if (sc_list_helper.
GetSize() == 0) {
406 LLDB_LOG(log,
"[{0}] {1}({2}) is skipped - fail to find match in symtab",
410 LLDB_LOG(log,
"[{0}] {1}({2}) is NOT skipped - found match in symtab",
418 include_inlines, sc_list);
422 const std::string &scope_qualified_name,
423 std::vector<ConstString> &mangled_names) {
427 __FUNCTION__, scope_qualified_name);
430 return m_sym_file_impl->GetMangledNamesForFunction(scope_qualified_name,
445 TypeClass type_mask,
TypeList &type_list) {
454llvm::Expected<lldb::TypeSystemSP>
458 LLDB_LOG(log,
"[{0}] {1} is skipped for language type {2}",
460 return llvm::createStringError(
461 "GetTypeSystemForLanguage is skipped by SymbolFileOnDemand");
469 bool only_root_namespaces) {
474 only_root_namespaces);
477 only_root_namespaces);
480std::vector<std::unique_ptr<lldb_private::CallEdge>>
486 std::vector<std::unique_ptr<lldb_private::CallEdge>> call_edges =
488 if (call_edges.size() > 0) {
489 LLDB_LOG(log,
"{0} call edges would be parsed for {1} if hydrated.",
490 call_edges.size(), func_id.
GetID());
509llvm::Expected<lldb::addr_t>
515 llvm::Expected<lldb::addr_t> stack_size =
518 LLDB_LOG(log,
"{0} stack size would return for symbol {1} if hydrated.",
519 *stack_size, symbol.
GetName());
569 LLDB_LOG(
GetLog(),
"[{0}] {1} is not skipped to support breakpoint hydration",
575 LLDB_LOG(
GetLog(),
"[{0}] {1} is not skipped to support breakpoint hydration",
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
A section + offset based address class.
A class that describes a compilation unit.
Represents a generic declaration context in a program.
Represents a generic declaration such as a function declaration.
ConstString GetName() const
Generic representation of a type in a programming language.
A uniqued constant string class.
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
A class that describes a function.
A class that encapsulates name lookup information.
lldb::FunctionNameType GetNameTypeMask() const
ConstString GetLookupName() const
A class that describes an executable image and its associated object and symbol files.
"lldb/Core/SourceLocationSpec.h" A source location specifier class.
This base class provides an interface to stack frames.
std::chrono::duration< double > Duration
A stream class that can stream formatted output to a file.
A list of support files for a CompileUnit.
Defines a list of symbol context objects.
uint32_t GetSize() const
Get accessor for a symbol context list size.
"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.
Symtab * GetSymtab() override
uint32_t GetAbilities() override
Get a mask of what this symbol file supports for the object file that it was constructed with.
~SymbolFileOnDemand() override
bool m_debug_info_enabled
void FindTypes(const lldb_private::TypeQuery &query, lldb_private::TypeResults &results) override
Find types using a type-matching object that contains all search parameters.
void GetMangledNamesForFunction(const std::string &scope_qualified_name, std::vector< lldb_private::ConstString > &mangled_names) override
size_t ParseTypes(lldb_private::CompileUnit &comp_unit) override
size_t ParseBlocksRecursive(lldb_private::Function &func) override
bool ParseLineTable(lldb_private::CompileUnit &comp_unit) override
std::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.
bool ParseImportedModules(const lldb_private::SymbolContext &sc, std::vector< lldb_private::SourceModule > &imported_modules) override
lldb_private::Type * ResolveTypeUID(lldb::user_id_t type_uid) override
uint64_t GetDebugInfoSize(bool load_all_debug_info=false) override
Metrics gathering functions.
uint32_t ResolveSymbolContext(const lldb_private::Address &so_addr, lldb::SymbolContextItem resolve_scope, lldb_private::SymbolContext &sc) override
void DumpClangAST(lldb_private::Stream &s) override
lldb::UnwindPlanSP GetUnwindPlan(const Address &address, const RegisterInfoResolver &resolver) override
SymbolFileOnDemand(std::unique_ptr< SymbolFile > &&symbol_file)
void FindGlobalVariables(lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, lldb_private::VariableList &variables) override
lldb_private::CompilerDeclContext FindNamespace(lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx, bool only_root_namespaces) override
Finds a namespace of name name and whose parent context is parent_decl_ctx.
llvm::Expected< lldb::TypeSystemSP > GetTypeSystemForLanguage(lldb::LanguageType language) override
std::recursive_mutex & GetModuleMutex() const override
Symbols file subclasses should override this to return the Module that owns the TypeSystem that this ...
llvm::Expected< lldb::addr_t > GetParameterStackSize(Symbol &symbol) override
Return the number of stack bytes taken up by the parameters to this function.
lldb_private::XcodeSDK ParseXcodeSDK(lldb_private::CompileUnit &comp_unit) override
Return the Xcode SDK comp_unit was compiled against.
bool CompleteType(lldb_private::CompilerType &compiler_type) override
bool ForEachExternalModule(lldb_private::CompileUnit &, llvm::DenseSet< lldb_private::SymbolFile * > &, llvm::function_ref< bool(lldb_private::Module &)>) override
lldb_private::StatsDuration::Duration GetDebugInfoParseTime() override
Return the time taken to parse the debug information.
lldb::CompUnitSP GetCompileUnitAtIndex(uint32_t idx) override
ConstString GetSymbolFileName()
void PreloadSymbols() override
void Dump(lldb_private::Stream &s) override
void SetLoadDebugInfoEnabled() override
Specify debug info should be loaded.
uint32_t GetNumCompileUnits() override
std::unique_ptr< SymbolFile > m_sym_file_impl
bool ParseSupportFiles(lldb_private::CompileUnit &comp_unit, lldb_private::SupportFileList &support_files) override
uint32_t CalculateAbilities() override
bool ParseIsOptimized(lldb_private::CompileUnit &comp_unit) override
lldb_private::CompilerDecl GetDeclForUID(lldb::user_id_t uid) override
void GetTypes(lldb_private::SymbolContextScope *sc_scope, lldb::TypeClass type_mask, lldb_private::TypeList &type_list) override
size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override
lldb_private::CompilerDeclContext GetDeclContextContainingUID(lldb::user_id_t uid) override
lldb_private::CompilerDeclContext GetDeclContextForUID(lldb::user_id_t uid) override
std::vector< std::unique_ptr< lldb_private::CallEdge > > ParseCallEdgesInFunction(UserID func_id) override
lldb_private::StatsDuration::Duration GetDebugInfoIndexTime() override
Return the time it took to index the debug information in the object file.
void FindFunctions(const lldb_private::Module::LookupInfo &lookup_info, const lldb_private::CompilerDeclContext &parent_decl_ctx, bool include_inlines, lldb_private::SymbolContextList &sc_list) override
bool ParseDebugMacros(lldb_private::CompileUnit &comp_unit) override
size_t ParseVariablesForContext(const lldb_private::SymbolContext &sc) override
static char ID
LLVM RTTI support.
void ParseDeclsForContext(lldb_private::CompilerDeclContext decl_ctx) override
lldb_private::Status CalculateFrameVariableError(lldb_private::StackFrame &frame) override
Subclasses will override this function to for GetFrameVariableError().
lldb::LanguageType ParseLanguage(lldb_private::CompileUnit &comp_unit) override
void InitializeObject() override
Initialize the SymbolFile object.
virtual llvm::Expected< lldb::addr_t > GetParameterStackSize(Symbol &symbol)
Return the number of stack bytes taken up by the parameters to this function.
virtual CompilerDeclContext FindNamespace(ConstString name, const CompilerDeclContext &parent_decl_ctx, bool only_root_namespaces=false)
Finds a namespace of name name and whose parent context is parent_decl_ctx.
ConstString GetName() const
Symbol * FindFirstSymbolWithNameAndType(ConstString name, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility)
void FindFunctionSymbols(ConstString name, uint32_t name_type_mask, SymbolContextList &sc_list)
uint32_t AppendSymbolIndexesMatchingRegExAndType(const RegularExpression ®ex, lldb::SymbolType symbol_type, std::vector< uint32_t > &indexes, Mangled::NamePreference name_preference=Mangled::ePreferDemangled)
A class that contains all state required for type lookups.
This class tracks the state and results of a TypeQuery.
An abstraction for Xcode-style SDKs that works like ArchSpec.
llvm::StringRef GetString() const
A class that represents a running process on the host machine.
LanguageType
Programming language type.
@ eLanguageTypeUnknown
Unknown or invalid language value.
std::shared_ptr< lldb_private::UnwindPlan > UnwindPlanSP
std::shared_ptr< lldb_private::CompileUnit > CompUnitSP
A mix in class that contains a generic user ID.
lldb::user_id_t GetID() const
Get accessor for the user ID.