LLDB  mainline
SymbolFileOnDemand.cpp
Go to the documentation of this file.
1 //===-- SymbolFileDWARFDebugMap.cpp ---------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
10 
11 #include "lldb/Core/Module.h"
12 #include "lldb/Symbol/SymbolFile.h"
13 
14 #include <memory>
15 
16 using namespace lldb;
17 using namespace lldb_private;
18 
20 
21 SymbolFileOnDemand::SymbolFileOnDemand(
22  std::unique_ptr<SymbolFile> &&symbol_file)
23  : m_sym_file_impl(std::move(symbol_file)) {}
24 
26 
28  // Explicitly allow ability checking to pass though.
29  // This should be a cheap operation.
30  return m_sym_file_impl->CalculateAbilities();
31 }
32 
33 std::recursive_mutex &SymbolFileOnDemand::GetModuleMutex() const {
34  return m_sym_file_impl->GetModuleMutex();
35 }
36 
38  if (!m_debug_info_enabled) {
39  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
40  __FUNCTION__);
41  return;
42  }
43  return m_sym_file_impl->InitializeObject();
44 }
45 
47  if (!m_debug_info_enabled) {
48  Log *log = GetLog();
49  LLDB_LOG(log, "[{0}] {1} is skipped", GetSymbolFileName(), __FUNCTION__);
50  if (log) {
51  lldb::LanguageType langType = m_sym_file_impl->ParseLanguage(comp_unit);
52  if (langType != eLanguageTypeUnknown)
53  LLDB_LOG(log, "Language {0} would return if hydrated.", langType);
54  }
55  return eLanguageTypeUnknown;
56  }
57  return m_sym_file_impl->ParseLanguage(comp_unit);
58 }
59 
61  if (!m_debug_info_enabled) {
62  Log *log = GetLog();
63  LLDB_LOG(log, "[{0}] {1} is skipped", GetSymbolFileName(), __FUNCTION__);
64  XcodeSDK defaultValue{};
65  if (log) {
66  XcodeSDK sdk = m_sym_file_impl->ParseXcodeSDK(comp_unit);
67  if (!(sdk == defaultValue))
68  LLDB_LOG(log, "SDK {0} would return if hydrated.", sdk.GetString());
69  }
70  return defaultValue;
71  }
72  return m_sym_file_impl->ParseXcodeSDK(comp_unit);
73 }
74 
76  if (!m_debug_info_enabled) {
77  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
78  __FUNCTION__);
79  return 0;
80  }
81  return m_sym_file_impl->ParseFunctions(comp_unit);
82 }
83 
85  if (!m_debug_info_enabled) {
86  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
87  __FUNCTION__);
88  return false;
89  }
90  return m_sym_file_impl->ParseLineTable(comp_unit);
91 }
92 
94  if (!m_debug_info_enabled) {
95  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
96  __FUNCTION__);
97  return false;
98  }
99  return m_sym_file_impl->ParseDebugMacros(comp_unit);
100 }
101 
103  CompileUnit &comp_unit,
104  llvm::DenseSet<lldb_private::SymbolFile *> &visited_symbol_files,
105  llvm::function_ref<bool(Module &)> lambda) {
106  if (!m_debug_info_enabled) {
107  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
108  __FUNCTION__);
109  // Return false to not early exit.
110  return false;
111  }
112  return m_sym_file_impl->ForEachExternalModule(comp_unit, visited_symbol_files,
113  lambda);
114 }
115 
117  FileSpecList &support_files) {
118  LLDB_LOG(GetLog(),
119  "[{0}] {1} is not skipped: explicitly allowed to support breakpoint",
120  GetSymbolFileName(), __FUNCTION__);
121  // Explicitly allow this API through to support source line breakpoint.
122  return m_sym_file_impl->ParseSupportFiles(comp_unit, support_files);
123 }
124 
126  if (!m_debug_info_enabled) {
127  Log *log = GetLog();
128  LLDB_LOG(log, "[{0}] {1} is skipped", GetSymbolFileName(), __FUNCTION__);
129  if (log) {
130  bool optimized = m_sym_file_impl->ParseIsOptimized(comp_unit);
131  if (optimized) {
132  LLDB_LOG(log, "Would return optimized if hydrated.");
133  }
134  }
135  return false;
136  }
137  return m_sym_file_impl->ParseIsOptimized(comp_unit);
138 }
139 
141  if (!m_debug_info_enabled) {
142  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
143  __FUNCTION__);
144  return 0;
145  }
146  return m_sym_file_impl->ParseTypes(comp_unit);
147 }
148 
150  const lldb_private::SymbolContext &sc,
151  std::vector<SourceModule> &imported_modules) {
152  if (!m_debug_info_enabled) {
153  Log *log = GetLog();
154  LLDB_LOG(log, "[{0}] {1} is skipped", GetSymbolFileName(), __FUNCTION__);
155  if (log) {
156  std::vector<SourceModule> tmp_imported_modules;
157  bool succeed =
158  m_sym_file_impl->ParseImportedModules(sc, tmp_imported_modules);
159  if (succeed)
160  LLDB_LOG(log, "{0} imported modules would be parsed if hydrated.",
161  tmp_imported_modules.size());
162  }
163  return false;
164  }
165  return m_sym_file_impl->ParseImportedModules(sc, imported_modules);
166 }
167 
169  if (!m_debug_info_enabled) {
170  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
171  __FUNCTION__);
172  return 0;
173  }
174  return m_sym_file_impl->ParseBlocksRecursive(func);
175 }
176 
178  if (!m_debug_info_enabled) {
179  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
180  __FUNCTION__);
181  return 0;
182  }
183  return m_sym_file_impl->ParseVariablesForContext(sc);
184 }
185 
187  if (!m_debug_info_enabled) {
188  Log *log = GetLog();
189  LLDB_LOG(log, "[{0}] {1} is skipped", GetSymbolFileName(), __FUNCTION__);
190  if (log) {
191  Type *resolved_type = m_sym_file_impl->ResolveTypeUID(type_uid);
192  if (resolved_type)
193  LLDB_LOG(log, "Type would be parsed for {0} if hydrated.", type_uid);
194  }
195  return nullptr;
196  }
197  return m_sym_file_impl->ResolveTypeUID(type_uid);
198 }
199 
200 llvm::Optional<SymbolFile::ArrayInfo>
202  lldb::user_id_t type_uid, const lldb_private::ExecutionContext *exe_ctx) {
203  if (!m_debug_info_enabled) {
204  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
205  __FUNCTION__);
206  return llvm::None;
207  }
208  return m_sym_file_impl->GetDynamicArrayInfoForUID(type_uid, exe_ctx);
209 }
210 
212  if (!m_debug_info_enabled) {
213  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
214  __FUNCTION__);
215  return false;
216  }
217  return m_sym_file_impl->CompleteType(compiler_type);
218 }
219 
221  if (!m_debug_info_enabled) {
222  Log *log = GetLog();
223  LLDB_LOG(log, "[{0}] {1} is skipped", GetSymbolFileName(), __FUNCTION__);
224  if (log) {
225  CompilerDecl parsed_decl = m_sym_file_impl->GetDeclForUID(type_uid);
226  if (parsed_decl != CompilerDecl()) {
227  LLDB_LOG(log, "CompilerDecl {0} would be parsed for {1} if hydrated.",
228  parsed_decl.GetName(), type_uid);
229  }
230  }
231  return CompilerDecl();
232  }
233  return m_sym_file_impl->GetDeclForUID(type_uid);
234 }
235 
238  if (!m_debug_info_enabled) {
239  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
240  __FUNCTION__);
241  return CompilerDeclContext();
242  }
243  return m_sym_file_impl->GetDeclContextForUID(type_uid);
244 }
245 
248  if (!m_debug_info_enabled) {
249  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
250  __FUNCTION__);
251  return CompilerDeclContext();
252  }
253  return m_sym_file_impl->GetDeclContextContainingUID(type_uid);
254 }
255 
257  if (!m_debug_info_enabled) {
258  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
259  __FUNCTION__);
260  return;
261  }
262  return m_sym_file_impl->ParseDeclsForContext(decl_ctx);
263 }
264 
265 uint32_t
267  SymbolContextItem resolve_scope,
268  SymbolContext &sc) {
269  if (!m_debug_info_enabled) {
270  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
271  __FUNCTION__);
272  return 0;
273  }
274  return m_sym_file_impl->ResolveSymbolContext(so_addr, resolve_scope, sc);
275 }
276 
278  if (!m_debug_info_enabled) {
279  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
280  __FUNCTION__);
281  return Status();
282  }
283  return m_sym_file_impl->CalculateFrameVariableError(frame);
284 }
285 
287  const SourceLocationSpec &src_location_spec,
288  SymbolContextItem resolve_scope, SymbolContextList &sc_list) {
289  if (!m_debug_info_enabled) {
290  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
291  __FUNCTION__);
292  return 0;
293  }
294  return m_sym_file_impl->ResolveSymbolContext(src_location_spec, resolve_scope,
295  sc_list);
296 }
297 
299  if (!m_debug_info_enabled) {
300  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
301  __FUNCTION__);
302  return;
303  }
304  return m_sym_file_impl->Dump(s);
305 }
306 
308  if (!m_debug_info_enabled) {
309  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
310  __FUNCTION__);
311  return;
312  }
313  return m_sym_file_impl->DumpClangAST(s);
314 }
315 
317  uint32_t max_matches,
318  VariableList &variables) {
319  if (!m_debug_info_enabled) {
320  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
321  __FUNCTION__);
322  return;
323  }
324  return m_sym_file_impl->FindGlobalVariables(regex, max_matches, variables);
325 }
326 
328  ConstString name, const CompilerDeclContext &parent_decl_ctx,
329  uint32_t max_matches, VariableList &variables) {
330  if (!m_debug_info_enabled) {
331  Log *log = GetLog();
332  Symtab *symtab = GetSymtab();
333  if (!symtab) {
334  LLDB_LOG(log, "[{0}] {1} is skipped - fail to get symtab",
335  GetSymbolFileName(), __FUNCTION__);
336  return;
337  }
338  Symbol *sym = symtab->FindFirstSymbolWithNameAndType(
340  if (!sym) {
341  LLDB_LOG(log, "[{0}] {1} is skipped - fail to find match in symtab",
342  GetSymbolFileName(), __FUNCTION__);
343  return;
344  }
345  LLDB_LOG(log, "[{0}] {1} is NOT skipped - found match in symtab",
346  GetSymbolFileName(), __FUNCTION__);
347 
348  // Found match in symbol table hydrate debug info and
349  // allow the FindGlobalVariables to go through.
351  }
352  return m_sym_file_impl->FindGlobalVariables(name, parent_decl_ctx,
353  max_matches, variables);
354 }
355 
357  bool include_inlines,
358  SymbolContextList &sc_list) {
359  if (!m_debug_info_enabled) {
360  Log *log = GetLog();
361  Symtab *symtab = GetSymtab();
362  if (!symtab) {
363  LLDB_LOG(log, "[{0}] {1} is skipped - fail to get symtab",
364  GetSymbolFileName(), __FUNCTION__);
365  return;
366  }
367  std::vector<uint32_t> symbol_indexes;
370  symbol_indexes);
371  if (symbol_indexes.empty()) {
372  LLDB_LOG(log, "[{0}] {1} is skipped - fail to find match in symtab",
373  GetSymbolFileName(), __FUNCTION__);
374  return;
375  }
376  LLDB_LOG(log, "[{0}] {1} is NOT skipped - found match in symtab",
377  GetSymbolFileName(), __FUNCTION__);
378 
379  // Found match in symbol table hydrate debug info and
380  // allow the FindFucntions to go through.
382  }
383  return m_sym_file_impl->FindFunctions(regex, include_inlines, sc_list);
384 }
385 
387  const Module::LookupInfo &lookup_info,
388  const CompilerDeclContext &parent_decl_ctx, bool include_inlines,
389  SymbolContextList &sc_list) {
390  ConstString name = lookup_info.GetLookupName();
391  FunctionNameType name_type_mask = lookup_info.GetNameTypeMask();
392  if (!m_debug_info_enabled) {
393  Log *log = GetLog();
394 
395  Symtab *symtab = GetSymtab();
396  if (!symtab) {
397  LLDB_LOG(log, "[{0}] {1}({2}) is skipped - fail to get symtab",
398  GetSymbolFileName(), __FUNCTION__, name);
399  return;
400  }
401 
402  SymbolContextList sc_list_helper;
403  symtab->FindFunctionSymbols(name, name_type_mask, sc_list_helper);
404  if (sc_list_helper.GetSize() == 0) {
405  LLDB_LOG(log, "[{0}] {1}({2}) is skipped - fail to find match in symtab",
406  GetSymbolFileName(), __FUNCTION__, name);
407  return;
408  }
409  LLDB_LOG(log, "[{0}] {1}({2}) is NOT skipped - found match in symtab",
410  GetSymbolFileName(), __FUNCTION__, name);
411 
412  // Found match in symbol table hydrate debug info and
413  // allow the FindFucntions to go through.
415  }
416  return m_sym_file_impl->FindFunctions(lookup_info, parent_decl_ctx,
417  include_inlines, sc_list);
418 }
419 
421  const std::string &scope_qualified_name,
422  std::vector<ConstString> &mangled_names) {
423  if (!m_debug_info_enabled) {
424  Log *log = GetLog();
425  LLDB_LOG(log, "[{0}] {1}({2}) is skipped", GetSymbolFileName(),
426  __FUNCTION__, scope_qualified_name);
427  return;
428  }
429  return m_sym_file_impl->GetMangledNamesForFunction(scope_qualified_name,
430  mangled_names);
431 }
432 
434  ConstString name, const CompilerDeclContext &parent_decl_ctx,
435  uint32_t max_matches,
436  llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
437  TypeMap &types) {
438  if (!m_debug_info_enabled) {
439  Log *log = GetLog();
440  LLDB_LOG(log, "[{0}] {1}({2}) is skipped", GetSymbolFileName(),
441  __FUNCTION__, name);
442  return;
443  }
444  return m_sym_file_impl->FindTypes(name, parent_decl_ctx, max_matches,
445  searched_symbol_files, types);
446 }
447 
449  llvm::ArrayRef<CompilerContext> pattern, LanguageSet languages,
450  llvm::DenseSet<SymbolFile *> &searched_symbol_files, TypeMap &types) {
451  if (!m_debug_info_enabled) {
452  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
453  __FUNCTION__);
454  return;
455  }
456  return m_sym_file_impl->FindTypes(pattern, languages, searched_symbol_files,
457  types);
458 }
459 
461  TypeClass type_mask, TypeList &type_list) {
462  if (!m_debug_info_enabled) {
463  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
464  __FUNCTION__);
465  return;
466  }
467  return m_sym_file_impl->GetTypes(sc_scope, type_mask, type_list);
468 }
469 
470 llvm::Expected<lldb::TypeSystemSP>
472  if (!m_debug_info_enabled) {
473  Log *log = GetLog();
474  LLDB_LOG(log, "[{0}] {1} is skipped for language type {2}",
475  GetSymbolFileName(), __FUNCTION__, language);
476  return llvm::make_error<llvm::StringError>(
477  "GetTypeSystemForLanguage is skipped by SymbolFileOnDemand",
478  llvm::inconvertibleErrorCode());
479  }
480  return m_sym_file_impl->GetTypeSystemForLanguage(language);
481 }
482 
485  const CompilerDeclContext &parent_decl_ctx) {
486  if (!m_debug_info_enabled) {
487  LLDB_LOG(GetLog(), "[{0}] {1}({2}) is skipped", GetSymbolFileName(),
488  __FUNCTION__, name);
489  return SymbolFile::FindNamespace(name, parent_decl_ctx);
490  }
491  return m_sym_file_impl->FindNamespace(name, parent_decl_ctx);
492 }
493 
494 std::vector<std::unique_ptr<lldb_private::CallEdge>>
496  if (!m_debug_info_enabled) {
497  Log *log = GetLog();
498  LLDB_LOG(log, "[{0}] {1} is skipped", GetSymbolFileName(), __FUNCTION__);
499  if (log) {
500  std::vector<std::unique_ptr<lldb_private::CallEdge>> call_edges =
501  m_sym_file_impl->ParseCallEdgesInFunction(func_id);
502  if (call_edges.size() > 0) {
503  LLDB_LOG(log, "{0} call edges would be parsed for {1} if hydrated.",
504  call_edges.size(), func_id.GetID());
505  }
506  }
507  return {};
508  }
509  return m_sym_file_impl->ParseCallEdgesInFunction(func_id);
510 }
511 
512 lldb::UnwindPlanSP
514  const RegisterInfoResolver &resolver) {
515  if (!m_debug_info_enabled) {
516  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
517  __FUNCTION__);
518  return nullptr;
519  }
520  return m_sym_file_impl->GetUnwindPlan(address, resolver);
521 }
522 
523 llvm::Expected<lldb::addr_t>
525  if (!m_debug_info_enabled) {
526  Log *log = GetLog();
527  LLDB_LOG(log, "[{0}] {1} is skipped", GetSymbolFileName(), __FUNCTION__);
528  if (log) {
529  llvm::Expected<lldb::addr_t> stack_size =
530  m_sym_file_impl->GetParameterStackSize(symbol);
531  if (stack_size) {
532  LLDB_LOG(log, "{0} stack size would return for symbol {1} if hydrated.",
533  *stack_size, symbol.GetName());
534  }
535  }
536  return SymbolFile::GetParameterStackSize(symbol);
537  }
538  return m_sym_file_impl->GetParameterStackSize(symbol);
539 }
540 
542  m_preload_symbols = true;
543  if (!m_debug_info_enabled) {
544  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
545  __FUNCTION__);
546  return;
547  }
548  return m_sym_file_impl->PreloadSymbols();
549 }
550 
552  // Always return the real debug info size.
553  LLDB_LOG(GetLog(), "[{0}] {1} is not skipped", GetSymbolFileName(),
554  __FUNCTION__);
555  return m_sym_file_impl->GetDebugInfoSize();
556 }
557 
559  // Always return the real parse time.
560  LLDB_LOG(GetLog(), "[{0}] {1} is not skipped", GetSymbolFileName(),
561  __FUNCTION__);
562  return m_sym_file_impl->GetDebugInfoParseTime();
563 }
564 
566  // Always return the real index time.
567  LLDB_LOG(GetLog(), "[{0}] {1} is not skipped", GetSymbolFileName(),
568  __FUNCTION__);
569  return m_sym_file_impl->GetDebugInfoIndexTime();
570 }
571 
574  return;
575  LLDB_LOG(GetLog(), "[{0}] Hydrate debug info", GetSymbolFileName());
576  m_debug_info_enabled = true;
578  if (m_preload_symbols)
579  PreloadSymbols();
580 }
581 
583  LLDB_LOG(GetLog(), "[{0}] {1} is not skipped to support breakpoint hydration",
584  GetSymbolFileName(), __FUNCTION__);
585  return m_sym_file_impl->GetNumCompileUnits();
586 }
587 
589  LLDB_LOG(GetLog(), "[{0}] {1} is not skipped to support breakpoint hydration",
590  GetSymbolFileName(), __FUNCTION__);
591  return m_sym_file_impl->GetCompileUnitAtIndex(idx);
592 }
593 
595  if (!m_debug_info_enabled) {
596  LLDB_LOG(GetLog(), "[{0}] {1} is skipped", GetSymbolFileName(),
597  __FUNCTION__);
598  return 0;
599  }
600  return m_sym_file_impl->GetAbilities();
601 }
lldb_private::SymbolFileOnDemand::PreloadSymbols
void PreloadSymbols() override
Definition: SymbolFileOnDemand.cpp:541
lldb_private::ExecutionContext
Definition: ExecutionContext.h:292
lldb_private::RegularExpression
Definition: RegularExpression.h:18
lldb_private::SymbolFileOnDemand::ParseBlocksRecursive
size_t ParseBlocksRecursive(lldb_private::Function &func) override
Definition: SymbolFileOnDemand.cpp:168
lldb_private::SymbolFileOnDemand::ParseImportedModules
bool ParseImportedModules(const lldb_private::SymbolContext &sc, std::vector< lldb_private::SourceModule > &imported_modules) override
Definition: SymbolFileOnDemand.cpp:149
lldb_private::Symbol
Definition: Symbol.h:20
lldb_private::SourceLocationSpec
Definition: SourceLocationSpec.h:27
lldb_private::SymbolFileOnDemand::GetUnwindPlan
lldb::UnwindPlanSP GetUnwindPlan(const Address &address, const RegisterInfoResolver &resolver) override
Definition: SymbolFileOnDemand.cpp:513
lldb_private::SymbolFileOnDemand::CalculateAbilities
uint32_t CalculateAbilities() override
Definition: SymbolFileOnDemand.cpp:27
lldb_private::SymbolFileOnDemand::DumpClangAST
void DumpClangAST(lldb_private::Stream &s) override
Definition: SymbolFileOnDemand.cpp:307
lldb_private::UserID
Definition: UserID.h:31
lldb_private::SymbolFileOnDemand::CalculateFrameVariableError
lldb_private::Status CalculateFrameVariableError(lldb_private::StackFrame &frame) override
Subclasses will override this function to for GetFrameVariableError().
Definition: SymbolFileOnDemand.cpp:277
lldb_private::SymbolFileOnDemand::GetDebugInfoIndexTime
lldb_private::StatsDuration::Duration GetDebugInfoIndexTime() override
Return the time it took to index the debug information in the object file.
Definition: SymbolFileOnDemand.cpp:565
lldb_private::StatsDuration::Duration
std::chrono::duration< double > Duration
Definition: Statistics.h:30
lldb_private::SymbolFileOnDemand::GetSymbolFileName
ConstString GetSymbolFileName()
Definition: SymbolFileOnDemand.h:232
Module.h
lldb_private::SymbolFileOnDemand::GetParameterStackSize
llvm::Expected< lldb::addr_t > GetParameterStackSize(Symbol &symbol) override
Return the number of stack bytes taken up by the parameters to this function.
Definition: SymbolFileOnDemand.cpp:524
lldb_private::XcodeSDK
An abstraction for Xcode-style SDKs that works like ArchSpec.
Definition: XcodeSDK.h:24
lldb::eSymbolTypeData
@ eSymbolTypeData
Definition: lldb-enumerations.h:625
lldb_private::SymbolContextList
Definition: SymbolContext.h:379
lldb_private::CompilerDecl
Represents a generic declaration such as a function declaration.
Definition: CompilerDecl.h:28
lldb_private::Module
Definition: Module.h:86
lldb_private::SymbolFileOnDemand::ParseSupportFiles
bool ParseSupportFiles(lldb_private::CompileUnit &comp_unit, lldb_private::FileSpecList &support_files) override
Definition: SymbolFileOnDemand.cpp:116
lldb_private::XcodeSDK::GetString
llvm::StringRef GetString() const
Definition: XcodeSDK.cpp:135
lldb_private::Stream
Definition: Stream.h:28
lldb_private::SymbolFileOnDemand::GetSymtab
Symtab * GetSymtab() override
Definition: SymbolFileOnDemand.h:194
lldb_private::SymbolContext
Definition: SymbolContext.h:33
lldb_private::SymbolFileOnDemand::ParseVariablesForContext
size_t ParseVariablesForContext(const lldb_private::SymbolContext &sc) override
Definition: SymbolFileOnDemand.cpp:177
lldb_private::VariableList
Definition: VariableList.h:18
lldb_private::CompileUnit
Definition: CompileUnit.h:38
lldb_private::Symtab::FindFunctionSymbols
void FindFunctionSymbols(ConstString name, uint32_t name_type_mask, SymbolContextList &sc_list)
Definition: Symtab.cpp:1092
lldb_private::SymbolFileOnDemand::~SymbolFileOnDemand
~SymbolFileOnDemand() override
lldb_private::SymbolFileOnDemand::GetLog
Log * GetLog() const
Definition: SymbolFileOnDemand.h:230
lldb_private::SymbolFileOnDemand::ParseFunctions
size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override
Definition: SymbolFileOnDemand.cpp:75
lldb_private::Symtab::FindFirstSymbolWithNameAndType
Symbol * FindFirstSymbolWithNameAndType(ConstString name, lldb::SymbolType symbol_type, Debug symbol_debug_type, Visibility symbol_visibility)
Definition: Symtab.cpp:861
lldb_private::Module::LookupInfo
Definition: Module.h:936
lldb_private::SymbolFileOnDemand::ParseLanguage
lldb::LanguageType ParseLanguage(lldb_private::CompileUnit &comp_unit) override
Definition: SymbolFileOnDemand.cpp:46
lldb::eSymbolTypeAny
@ eSymbolTypeAny
Definition: lldb-enumerations.h:620
lldb_private::Function
Definition: Function.h:409
lldb_private::SymbolFileOnDemand::GetAbilities
uint32_t GetAbilities() override
Get a mask of what this symbol file supports for the object file that it was constructed with.
Definition: SymbolFileOnDemand.cpp:594
lldb_private::SymbolFileOnDemand::m_debug_info_enabled
bool m_debug_info_enabled
Definition: SymbolFileOnDemand.h:237
ID
static char ID
Definition: IRDynamicChecks.cpp:33
lldb_private::SymbolFileOnDemand::FindGlobalVariables
void FindGlobalVariables(lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, lldb_private::VariableList &variables) override
Definition: SymbolFileOnDemand.cpp:327
lldb_private::CompilerDecl::GetName
ConstString GetName() const
Definition: CompilerDecl.cpp:15
lldb_private::SymbolFileOnDemand::GetDeclContextContainingUID
lldb_private::CompilerDeclContext GetDeclContextContainingUID(lldb::user_id_t uid) override
Definition: SymbolFileOnDemand.cpp:247
lldb_private::SymbolFileOnDemand::GetDebugInfoSize
uint64_t GetDebugInfoSize() override
Metrics gathering functions.
Definition: SymbolFileOnDemand.cpp:551
lldb_private::SymbolFileOnDemand::ParseXcodeSDK
lldb_private::XcodeSDK ParseXcodeSDK(lldb_private::CompileUnit &comp_unit) override
Return the Xcode SDK comp_unit was compiled against.
Definition: SymbolFileOnDemand.cpp:60
lldb_private::SymbolContextList::GetSize
uint32_t GetSize() const
Get accessor for a symbol context list size.
Definition: SymbolContext.cpp:1274
lldb_private::ConstString
Definition: ConstString.h:39
lldb_private::SymbolFileOnDemand::ParseTypes
size_t ParseTypes(lldb_private::CompileUnit &comp_unit) override
Definition: SymbolFileOnDemand.cpp:140
lldb_private::SymbolFileOnDemand::FindNamespace
lldb_private::CompilerDeclContext FindNamespace(lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx) override
Definition: SymbolFileOnDemand.cpp:484
lldb_private::SymbolFile::FindNamespace
virtual CompilerDeclContext FindNamespace(ConstString name, const CompilerDeclContext &parent_decl_ctx)
Definition: SymbolFile.h:317
lldb_private::SymbolFileOnDemand::FindTypes
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
Definition: SymbolFileOnDemand.cpp:433
lldb_private::SymbolFile::RegisterInfoResolver
Definition: SymbolFile.h:336
lldb_private::SymbolFileOnDemand::m_preload_symbols
bool m_preload_symbols
Definition: SymbolFileOnDemand.h:238
string
string(SUBSTRING ${p} 10 -1 pStripped) if($
Definition: Plugins/CMakeLists.txt:40
SymbolFileOnDemand.h
lldb_private::SymbolFileOnDemand::ResolveTypeUID
lldb_private::Type * ResolveTypeUID(lldb::user_id_t type_uid) override
Definition: SymbolFileOnDemand.cpp:186
lldb_private::TypeMap
Definition: TypeMap.h:20
lldb_private::CompilerDeclContext
Represents a generic declaration context in a program.
Definition: CompilerDeclContext.h:30
lldb_private::SymbolFileOnDemand::ParseCallEdgesInFunction
std::vector< std::unique_ptr< lldb_private::CallEdge > > ParseCallEdgesInFunction(UserID func_id) override
Definition: SymbolFileOnDemand.cpp:495
lldb_private::SymbolContextScope
Definition: SymbolContextScope.h:64
lldb_private::UserID::GetID
lldb::user_id_t GetID() const
Get accessor for the user ID.
Definition: UserID.h:47
lldb_private::Symbol::GetName
ConstString GetName() const
Definition: Symbol.cpp:500
lldb_private::SymbolFileOnDemand::GetMangledNamesForFunction
void GetMangledNamesForFunction(const std::string &scope_qualified_name, std::vector< lldb_private::ConstString > &mangled_names) override
Definition: SymbolFileOnDemand.cpp:420
lldb_private::Status
Definition: Status.h:44
lldb_private::Module::LookupInfo::GetLookupName
ConstString GetLookupName() const
Definition: Module.h:947
lldb_private::SymbolFileOnDemand::ForEachExternalModule
bool ForEachExternalModule(lldb_private::CompileUnit &, llvm::DenseSet< lldb_private::SymbolFile * > &, llvm::function_ref< bool(lldb_private::Module &)>) override
Definition: SymbolFileOnDemand.cpp:102
lldb_private::SymbolFileOnDemand::GetDynamicArrayInfoForUID
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.
Definition: SymbolFileOnDemand.cpp:201
lldb_private::SymbolFileOnDemand::ResolveSymbolContext
uint32_t ResolveSymbolContext(const lldb_private::Address &so_addr, lldb::SymbolContextItem resolve_scope, lldb_private::SymbolContext &sc) override
lldb_private::Symtab
Definition: Symtab.h:22
lldb_private::SymbolFileOnDemand::GetDeclForUID
lldb_private::CompilerDecl GetDeclForUID(lldb::user_id_t uid) override
Definition: SymbolFileOnDemand.cpp:220
uint32_t
lldb_private::SymbolFileOnDemand::InitializeObject
void InitializeObject() override
Initialize the SymbolFile object.
Definition: SymbolFileOnDemand.cpp:37
lldb_private::SymbolFileOnDemand::ParseIsOptimized
bool ParseIsOptimized(lldb_private::CompileUnit &comp_unit) override
Definition: SymbolFileOnDemand.cpp:125
lldb_private::Address
Definition: Address.h:59
lldb_private::Module::LookupInfo::GetNameTypeMask
lldb::FunctionNameType GetNameTypeMask() const
Definition: Module.h:951
lldb_private::Type
Definition: Type.h:66
lldb_private::Symtab::AppendSymbolIndexesMatchingRegExAndType
uint32_t AppendSymbolIndexesMatchingRegExAndType(const RegularExpression &regex, lldb::SymbolType symbol_type, std::vector< uint32_t > &indexes, Mangled::NamePreference name_preference=Mangled::ePreferDemangled)
Definition: Symtab.cpp:745
lldb_private::SymbolFile::GetParameterStackSize
virtual llvm::Expected< lldb::addr_t > GetParameterStackSize(Symbol &symbol)
Return the number of stack bytes taken up by the parameters to this function.
Definition: SymbolFile.h:350
LLDB_LOG
#define LLDB_LOG(log,...)
The LLDB_LOG* macros defined below are the way to emit log messages.
Definition: Log.h:337
lldb_private::SymbolFileOnDemand::GetDeclContextForUID
lldb_private::CompilerDeclContext GetDeclContextForUID(lldb::user_id_t uid) override
Definition: SymbolFileOnDemand.cpp:237
lldb_private::SymbolFileOnDemand::GetDebugInfoParseTime
lldb_private::StatsDuration::Duration GetDebugInfoParseTime() override
Return the time taken to parse the debug information.
Definition: SymbolFileOnDemand.cpp:558
lldb_private::CompilerType
Generic representation of a type in a programming language.
Definition: CompilerType.h:35
lldb_private::SymbolFileOnDemand::ParseDeclsForContext
void ParseDeclsForContext(lldb_private::CompilerDeclContext decl_ctx) override
Definition: SymbolFileOnDemand.cpp:256
lldb_private::SymbolFileOnDemand::Dump
void Dump(lldb_private::Stream &s) override
Definition: SymbolFileOnDemand.cpp:298
lldb::user_id_t
uint64_t user_id_t
Definition: lldb-types.h:84
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::Symtab::eVisibilityAny
@ eVisibilityAny
Definition: Symtab.h:33
lldb_private::Symtab::eDebugAny
@ eDebugAny
Definition: Symtab.h:30
lldb_private::TypeList
Definition: TypeList.h:20
lldb_private::LanguageSet
A SmallBitVector that represents a set of source languages (lldb::LanguageType).
Definition: TypeSystem.h:44
lldb_private::SymbolFileOnDemand::GetModuleMutex
std::recursive_mutex & GetModuleMutex() const override
Symbols file subclasses should override this to return the Module that owns the TypeSystem that this ...
Definition: SymbolFileOnDemand.cpp:33
lldb_private::SymbolFileOnDemand::FindFunctions
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
Definition: SymbolFileOnDemand.cpp:386
lldb_private::Log
Definition: Log.h:115
lldb_private::SymbolFileOnDemand::SetLoadDebugInfoEnabled
void SetLoadDebugInfoEnabled() override
Specify debug info should be loaded.
Definition: SymbolFileOnDemand.cpp:572
lldb_private::SymbolFileOnDemand::GetNumCompileUnits
uint32_t GetNumCompileUnits() override
Definition: SymbolFileOnDemand.cpp:582
lldb_private::SymbolFileOnDemand::GetCompileUnitAtIndex
lldb::CompUnitSP GetCompileUnitAtIndex(uint32_t idx) override
Definition: SymbolFileOnDemand.cpp:588
lldb::eLanguageTypeUnknown
@ eLanguageTypeUnknown
Unknown or invalid language value.
Definition: lldb-enumerations.h:438
lldb_private::StackFrame
Definition: StackFrame.h:40
lldb
Definition: SBAddress.h:15
lldb_private::SymbolFileOnDemand::GetTypes
void GetTypes(lldb_private::SymbolContextScope *sc_scope, lldb::TypeClass type_mask, lldb_private::TypeList &type_list) override
Definition: SymbolFileOnDemand.cpp:460
lldb_private::SymbolFileOnDemand::ParseDebugMacros
bool ParseDebugMacros(lldb_private::CompileUnit &comp_unit) override
Definition: SymbolFileOnDemand.cpp:93
lldb_private::SymbolFileOnDemand::m_sym_file_impl
std::unique_ptr< SymbolFile > m_sym_file_impl
Definition: SymbolFileOnDemand.h:239
lldb_private::SymbolFileOnDemand::GetTypeSystemForLanguage
llvm::Expected< lldb::TypeSystemSP > GetTypeSystemForLanguage(lldb::LanguageType language) override
Definition: SymbolFileOnDemand.cpp:471
SymbolFile.h
lldb_private::SymbolFileOnDemand::CompleteType
bool CompleteType(lldb_private::CompilerType &compiler_type) override
Definition: SymbolFileOnDemand.cpp:211
lldb_private::SymbolFileOnDemand::ParseLineTable
bool ParseLineTable(lldb_private::CompileUnit &comp_unit) override
Definition: SymbolFileOnDemand.cpp:84
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:437