LLDB mainline
SymbolFileDWARF.h
Go to the documentation of this file.
1//===-- SymbolFileDWARF.h --------------------------------------*- C++ -*-===//
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
9#ifndef LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_SYMBOLFILEDWARF_H
10#define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_SYMBOLFILEDWARF_H
11
12#include <list>
13#include <map>
14#include <mutex>
15#include <optional>
16#include <unordered_map>
17#include <vector>
18
19#include "llvm/ADT/DenseMap.h"
20#include "llvm/ADT/SetVector.h"
21#include "llvm/Support/Threading.h"
22
24#include "lldb/Core/dwarf.h"
31#include "lldb/Utility/Flags.h"
33#include "lldb/lldb-private.h"
34
35#include "DWARFContext.h"
36#include "DWARFDataExtractor.h"
37#include "DWARFDefines.h"
38#include "DWARFIndex.h"
39#include "UniqueDWARFASTType.h"
40
41// Forward Declarations for this DWARF plugin
42class DebugMapModule;
45class DWARFDebugInfo;
47class DWARFDebugLine;
50class DWARFFormValue;
51class DWARFTypeUnit;
54class SymbolFileDWARFDwp;
55class UserID;
56
57namespace llvm {
58class DWARFDebugAbbrev;
59}
60
61#define DIE_IS_BEING_PARSED ((lldb_private::Type *)1)
62
64 /// LLVM RTTI support.
65 static char ID;
66
67public:
68 /// LLVM RTTI support.
69 /// \{
70 bool isA(const void *ClassID) const override {
71 return ClassID == &ID || SymbolFileCommon::isA(ClassID);
72 }
73 static bool classof(const SymbolFile *obj) { return obj->isA(&ID); }
74 /// \}
75
77 friend class SymbolFileDWARFDwo;
78 friend class DebugMapModule;
79 friend class DWARFCompileUnit;
80 friend class DWARFDIE;
81 friend class DWARFASTParserClang;
82
83 // Static Functions
84 static void Initialize();
85
86 static void Terminate();
87
88 static void DebuggerInitialize(lldb_private::Debugger &debugger);
89
90 static llvm::StringRef GetPluginNameStatic() { return "dwarf"; }
91
92 static llvm::StringRef GetPluginDescriptionStatic();
93
96
97 // Constructors and Destructors
98
100 lldb_private::SectionList *dwo_section_list);
101
103
104 uint32_t CalculateAbilities() override;
105
106 void InitializeObject() override;
107
108 // Compile Unit function calls
109
111 ParseLanguage(lldb_private::CompileUnit &comp_unit) override;
112
114 ParseXcodeSDK(lldb_private::CompileUnit &comp_unit) override;
115
116 size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override;
117
118 bool ParseLineTable(lldb_private::CompileUnit &comp_unit) override;
119
120 bool ParseDebugMacros(lldb_private::CompileUnit &comp_unit) override;
121
123 lldb_private::CompileUnit &, llvm::DenseSet<lldb_private::SymbolFile *> &,
124 llvm::function_ref<bool(lldb_private::Module &)>) override;
125
127 lldb_private::FileSpecList &support_files) override;
128
129 bool ParseIsOptimized(lldb_private::CompileUnit &comp_unit) override;
130
131 size_t ParseTypes(lldb_private::CompileUnit &comp_unit) override;
132
135 std::vector<lldb_private::SourceModule> &imported_modules) override;
136
137 size_t ParseBlocksRecursive(lldb_private::Function &func) override;
138
139 size_t
141
143 std::optional<ArrayInfo> GetDynamicArrayInfoForUID(
144 lldb::user_id_t type_uid,
145 const lldb_private::ExecutionContext *exe_ctx) override;
146
147 bool CompleteType(lldb_private::CompilerType &compiler_type) override;
148
150 bool assert_not_being_parsed = true,
151 bool resolve_function_context = false);
152
154
157
160
161 void
163
165 lldb::SymbolContextItem resolve_scope,
166 lldb_private::SymbolContext &sc) override;
167
170
172 const lldb_private::SourceLocationSpec &src_location_spec,
173 lldb::SymbolContextItem resolve_scope,
174 lldb_private::SymbolContextList &sc_list) override;
175
176 void
178 const lldb_private::CompilerDeclContext &parent_decl_ctx,
179 uint32_t max_matches,
180 lldb_private::VariableList &variables) override;
181
183 uint32_t max_matches,
184 lldb_private::VariableList &variables) override;
185
186 void FindFunctions(const lldb_private::Module::LookupInfo &lookup_info,
187 const lldb_private::CompilerDeclContext &parent_decl_ctx,
188 bool include_inlines,
189 lldb_private::SymbolContextList &sc_list) override;
190
192 bool include_inlines,
193 lldb_private::SymbolContextList &sc_list) override;
194
196 const std::string &scope_qualified_name,
197 std::vector<lldb_private::ConstString> &mangled_names) override;
198
199 void
201 const lldb_private::CompilerDeclContext &parent_decl_ctx,
202 uint32_t max_matches,
203 llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
204 lldb_private::TypeMap &types) override;
205
206 void FindTypes(llvm::ArrayRef<lldb_private::CompilerContext> pattern,
208 llvm::DenseSet<SymbolFile *> &searched_symbol_files,
209 lldb_private::TypeMap &types) override;
210
212 lldb::TypeClass type_mask,
213 lldb_private::TypeList &type_list) override;
214
215 llvm::Expected<lldb::TypeSystemSP>
217
220 const lldb_private::CompilerDeclContext &parent_decl_ctx,
221 bool only_root_namespaces) override;
222
223 void PreloadSymbols() override;
224
225 std::recursive_mutex &GetModuleMutex() const override;
226
227 // PluginInterface protocol
228 llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
229
230 llvm::DWARFDebugAbbrev *DebugAbbrev();
231
233
235
236 static bool SupportedVersion(uint16_t version);
237
240
241 bool
243
246
247 virtual void GetObjCMethods(lldb_private::ConstString class_name,
248 llvm::function_ref<bool(DWARFDIE die)> callback);
249
251
253
255
257
258 typedef std::map<lldb_private::ConstString, lldb::ModuleSP>
260
261 /// Return the list of Clang modules imported by this SymbolFile.
264 }
265
266 virtual DWARFDIE GetDIE(const DIERef &die_ref);
267
269
270 std::shared_ptr<SymbolFileDWARFDwo>
272 const DWARFDebugInfoEntry &cu_die);
273
274 /// If this is a DWARF object with a single CU, return its DW_AT_dwo_id.
275 std::optional<uint64_t> GetDWOId();
276
277 static bool
279 const DWARFDIE &die, bool only_root_namespaces = false);
280
281 std::vector<std::unique_ptr<lldb_private::CallEdge>>
283
284 void Dump(lldb_private::Stream &s) override;
285
286 void DumpClangAST(lldb_private::Stream &s) override;
287
289
290 const std::shared_ptr<SymbolFileDWARFDwo> &GetDwpSymbolFile();
291
292 lldb_private::FileSpec GetFile(DWARFUnit &unit, size_t file_idx);
293
294 static llvm::Expected<lldb::TypeSystemSP> GetTypeSystem(DWARFUnit &unit);
295
297
298 // CompilerDecl related functions
299
301
303
306
308
309 static lldb::LanguageType LanguageTypeFromDWARF(uint64_t val);
310
312 /// Same as GetLanguage() but reports all C++ versions as C++ (no version).
314
316 return m_parse_time;
317 }
319
321 return m_parse_time;
322 }
323
324 virtual lldb::offset_t
326 const lldb::offset_t data_offset,
327 const uint8_t op) const {
328 return LLDB_INVALID_OFFSET;
329 }
330
331 virtual bool
333 lldb::offset_t &offset,
334 std::vector<lldb_private::Value> &stack) const {
335 return false;
336 }
337
339
340 std::optional<uint64_t> GetFileIndex() const { return m_file_index; }
341 void SetFileIndex(std::optional<uint64_t> file_index) {
342 m_file_index = file_index;
343 }
344
345protected:
346 typedef llvm::DenseMap<const DWARFDebugInfoEntry *, lldb_private::Type *>
348 typedef llvm::DenseMap<const DWARFDebugInfoEntry *, lldb::VariableSP>
350 typedef llvm::DenseMap<const DWARFDebugInfoEntry *,
353 typedef llvm::DenseMap<lldb::opaque_compiler_type_t, DIERef> ClangTypeToDIE;
354
356 const SymbolFileDWARF &operator=(const SymbolFileDWARF &) = delete;
357
358 virtual void LoadSectionData(lldb::SectionType sect_type,
360
362 const lldb_private::CompilerDeclContext &decl_ctx);
363
364 uint32_t CalculateNumCompileUnits() override;
365
366 lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
367
369
371
372 virtual DWARFCompileUnit *
374
376
378
380 const DWARFDIE &die);
381
383 lldb_private::Block *parent_block,
384 const DWARFDIE &die,
385 lldb::addr_t subprogram_low_pc, uint32_t depth);
386
387 size_t ParseTypes(const lldb_private::SymbolContext &sc, const DWARFDIE &die,
388 bool parse_siblings, bool parse_children);
389
391 const DWARFDIE &die, bool *type_is_new);
392
393 bool ParseSupportFiles(DWARFUnit &dwarf_cu, const lldb::ModuleSP &module,
394 lldb_private::FileSpecList &support_files);
395
397 bool assert_not_being_parsed);
398
400
402 const DWARFDIE &die,
403 const lldb::addr_t func_low_pc);
405 const DWARFDIE &die);
406
407 void
409 const DWARFDIE &die,
410 lldb_private::VariableList &cc_variable_list);
411
413 const DWARFDIE &die,
414 const lldb::addr_t func_low_pc);
415
417 const lldb_private::SymbolContext &sc, const DWARFDIE &die,
418 lldb::addr_t func_low_pc, DIEArray &accumulator);
419
422 llvm::ArrayRef<DIERef> variable_dies,
423 lldb::addr_t func_low_pc);
424
426 DIEArray &&variable_dies);
427
428 bool ClassOrStructIsVirtual(const DWARFDIE &die);
429
430 // Given a die_offset, figure out the symbol context representing that die.
431 bool ResolveFunction(const DWARFDIE &die, bool include_inlines,
433
434 /// Resolve functions and (possibly) blocks for the given file address and a
435 /// compile unit. The compile unit comes from the sc argument and it must be
436 /// set. The results of the lookup (if any) are written back to the symbol
437 /// context.
438 void ResolveFunctionAndBlock(lldb::addr_t file_vm_addr, bool lookup_block,
440
441 virtual lldb::TypeSP
443
444 virtual lldb::TypeSP
447 bool must_be_implementation);
448
451
453 bool resolve_function_context = false);
454
455 void SetDebugMapModule(const lldb::ModuleSP &module_sp) {
456 m_debug_map_module_wp = module_sp;
457 }
458
460
462 FindBlockContainingSpecification(const DIERef &func_die_ref,
463 dw_offset_t spec_block_die_offset);
464
467 dw_offset_t spec_block_die_offset);
468
470
471 bool DIEDeclContextsMatch(const DWARFDIE &die1, const DWARFDIE &die2);
472
473 bool ClassContainsSelector(const DWARFDIE &class_die,
475
476 /// Parse call site entries (DW_TAG_call_site), including any nested call site
477 /// parameters (DW_TAG_call_site_parameter).
478 std::vector<std::unique_ptr<lldb_private::CallEdge>>
479 CollectCallEdges(lldb::ModuleSP module, DWARFDIE function_die);
480
481 /// If this symbol file is linked to by a debug map (see
482 /// SymbolFileDWARFDebugMap), and \p file_addr is a file address relative to
483 /// an object file, adjust \p file_addr so that it is relative to the main
484 /// binary. Returns the adjusted address, or \p file_addr if no adjustment is
485 /// needed, on success and LLDB_INVALID_ADDRESS otherwise.
487
489
490 typedef llvm::SetVector<lldb_private::Type *> TypeSet;
491
492 void GetTypes(const DWARFDIE &die, dw_offset_t min_die_offset,
493 dw_offset_t max_die_offset, uint32_t type_mask,
494 TypeSet &type_set);
495
499
501
503
505
507
510 }
511
514 }
515
517 std::optional<uint32_t> GetDWARFUnitIndex(uint32_t cu_idx);
518
520
522
524 const lldb_private::SectionList &section_list);
525
527
529 std::unordered_map<lldb::CompUnitSP, lldb_private::Args> &args) override;
530
533
534 llvm::once_flag m_dwp_symfile_once_flag;
535 std::shared_ptr<SymbolFileDWARFDwo> m_dwp_symfile;
536
538
539 llvm::once_flag m_info_once_flag;
540 std::unique_ptr<DWARFDebugInfo> m_info;
541
542 std::unique_ptr<llvm::DWARFDebugAbbrev> m_abbr;
543 std::unique_ptr<GlobalVariableMap> m_global_aranges_up;
544
545 typedef std::unordered_map<lldb::offset_t, lldb_private::DebugMacrosSP>
548
550 std::unique_ptr<lldb_private::DWARFIndex> m_index;
553
554 typedef std::set<DIERef> DIERefSet;
555 typedef llvm::StringMap<DIERefSet> NameToOffsetMap;
557 std::unique_ptr<DWARFDebugRanges> m_ranges;
563 llvm::DenseMap<dw_offset_t, lldb_private::FileSpecList>
565 std::vector<uint32_t> m_lldb_cu_to_dwarf_unit;
566 /// DWARF does not provide a good way for traditional (concatenating) linkers
567 /// to invalidate debug info describing dead-stripped code. These linkers will
568 /// keep the debug info but resolve any addresses referring to such code as
569 /// zero (BFD) or a small positive integer (zero + relocation addend -- GOLD).
570 /// Try to filter out this debug info by comparing it to the lowest code
571 /// address in the module.
574 std::atomic_flag m_dwo_warning_issued = ATOMIC_FLAG_INIT;
575 /// If this DWARF file a .DWO file or a DWARF .o file on mac when
576 /// no dSYM file is being used, this file index will be set to a
577 /// valid value that can be used in DIERef objects which will contain
578 /// an index that identifies the .DWO or .o file.
579 std::optional<uint64_t> m_file_index;
580};
581
582#endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_SYMBOLFILEDWARF_H
std::vector< DIERef > DIEArray
Definition: DIERef.h:133
Identifies a DWARF debug info entry within a given Module.
Definition: DIERef.h:28
DWARFDebugInfoEntry objects assume that they are living in one big vector and do pointer arithmetic o...
lldb_private::CompilerDeclContext GetDeclContextContainingUID(lldb::user_id_t uid) override
static lldb_private::CompilerDeclContext GetContainingDeclContext(const DWARFDIE &die)
virtual lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE(const DWARFDIE &die, lldb_private::ConstString type_name, bool must_be_implementation)
static bool SupportedVersion(uint16_t version)
void FindTypes(llvm::ArrayRef< lldb_private::CompilerContext > pattern, lldb_private::LanguageSet languages, llvm::DenseSet< SymbolFile * > &searched_symbol_files, lldb_private::TypeMap &types) override
const SymbolFileDWARF & operator=(const SymbolFileDWARF &)=delete
std::optional< uint32_t > GetDWARFUnitIndex(uint32_t cu_idx)
virtual DIEToVariableSP & GetDIEToVariable()
uint32_t ResolveSymbolContext(const lldb_private::SourceLocationSpec &src_location_spec, lldb::SymbolContextItem resolve_scope, lldb_private::SymbolContextList &sc_list) override
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb::VariableSP > DIEToVariableSP
lldb_private::CompileUnit * GetCompUnitForDWARFCompUnit(DWARFCompileUnit &dwarf_cu)
DWARFDebugRanges * GetDebugRanges()
void BuildCuTranslationTable()
size_t ParseVariablesForContext(const lldb_private::SymbolContext &sc) override
SymbolFileDWARF(const SymbolFileDWARF &)=delete
DWARFDIE FindBlockContainingSpecification(const DIERef &func_die_ref, dw_offset_t spec_block_die_offset)
void Dump(lldb_private::Stream &s) override
size_t ParseVariablesInFunctionContext(const lldb_private::SymbolContext &sc, const DWARFDIE &die, const lldb::addr_t func_low_pc)
bool HasForwardDeclForClangType(const lldb_private::CompilerType &compiler_type)
void UpdateExternalModuleListIfNeeded()
DIEToVariableSP m_die_to_variable_sp
DebugMacrosMap m_debug_macros_map
static DWARFASTParser * GetDWARFParser(DWARFUnit &unit)
bool Supports_DW_AT_APPLE_objc_complete_type(DWARFUnit *cu)
static lldb::LanguageType GetLanguageFamily(DWARFUnit &unit)
Same as GetLanguage() but reports all C++ versions as C++ (no version).
const lldb_private::FileSpecList & GetTypeUnitSupportFiles(DWARFTypeUnit &tu)
bool ResolveFunction(const DWARFDIE &die, bool include_inlines, lldb_private::SymbolContextList &sc_list)
static char ID
LLVM RTTI support.
size_t ParseVariablesInFunctionContextRecursive(const lldb_private::SymbolContext &sc, const DWARFDIE &die, lldb::addr_t func_low_pc, DIEArray &accumulator)
lldb_private::StatsDuration & GetDebugInfoParseTimeRef()
std::map< lldb_private::ConstString, lldb::ModuleSP > ExternalTypeModuleMap
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.
static bool DIEInDeclContext(const lldb_private::CompilerDeclContext &parent_decl_ctx, const DWARFDIE &die, bool only_root_namespaces=false)
lldb_private::Type * ResolveType(const DWARFDIE &die, bool assert_not_being_parsed=true, bool resolve_function_context=false)
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb_private::Type * > DIEToTypePtr
virtual lldb::offset_t GetVendorDWARFOpcodeSize(const lldb_private::DataExtractor &data, const lldb::offset_t data_offset, const uint8_t op) const
ExternalTypeModuleMap m_external_type_modules
bool isA(const void *ClassID) const override
LLVM RTTI support.
size_t PopulateBlockVariableList(lldb_private::VariableList &variable_list, const lldb_private::SymbolContext &sc, llvm::ArrayRef< DIERef > variable_dies, lldb::addr_t func_low_pc)
lldb_private::Function * ParseFunction(lldb_private::CompileUnit &comp_unit, const DWARFDIE &die)
DWARFUnit * GetNextUnparsedDWARFCompileUnit(DWARFUnit *prev_cu)
lldb::ModuleSP GetExternalModule(lldb_private::ConstString name)
void InitializeFirstCodeAddressRecursive(const lldb_private::SectionList &section_list)
const std::shared_ptr< SymbolFileDWARFDwo > & GetDwpSymbolFile()
size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override
std::recursive_mutex & GetModuleMutex() const override
Symbols file subclasses should override this to return the Module that owns the TypeSystem that this ...
bool ClassContainsSelector(const DWARFDIE &class_die, lldb_private::ConstString selector)
virtual DWARFCompileUnit * GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit)
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.
lldb_private::RangeDataVector< lldb::addr_t, lldb::addr_t, lldb_private::Variable * > GlobalVariableMap
uint32_t ResolveSymbolContext(const lldb_private::Address &so_addr, lldb::SymbolContextItem resolve_scope, lldb_private::SymbolContext &sc) override
bool CompleteType(lldb_private::CompilerType &compiler_type) override
GlobalVariableMap & GetGlobalAranges()
lldb::TypeSP GetTypeForDIE(const DWARFDIE &die, bool resolve_function_context=false)
NameToOffsetMap m_function_scope_qualified_name_map
bool ParseImportedModules(const lldb_private::SymbolContext &sc, std::vector< lldb_private::SourceModule > &imported_modules) override
size_t ParseBlocksRecursive(lldb_private::Function &func) override
lldb::LanguageType ParseLanguage(lldb_private::CompileUnit &comp_unit) override
lldb_private::ConstString ConstructFunctionDemangledName(const DWARFDIE &die)
std::unique_ptr< GlobalVariableMap > m_global_aranges_up
bool ForEachExternalModule(lldb_private::CompileUnit &, llvm::DenseSet< lldb_private::SymbolFile * > &, llvm::function_ref< bool(lldb_private::Module &)>) override
virtual DIEToClangType & GetForwardDeclDieToClangType()
std::optional< uint64_t > GetFileIndex() const
lldb_private::FileSpec GetFile(DWARFUnit &unit, size_t file_idx)
std::unique_ptr< llvm::DWARFDebugAbbrev > m_abbr
ClangTypeToDIE m_forward_decl_clang_type_to_die
size_t ParseTypes(lldb_private::CompileUnit &comp_unit) override
static bool classof(const SymbolFile *obj)
virtual DWARFDIE GetDIE(const DIERef &die_ref)
static void Initialize()
void InitializeFirstCodeAddress()
void SetFileIndex(std::optional< uint64_t > file_index)
virtual bool ParseVendorDWARFOpcode(uint8_t op, const lldb_private::DataExtractor &opcodes, lldb::offset_t &offset, std::vector< lldb_private::Value > &stack) const
bool DeclContextMatchesThisSymbolFile(const lldb_private::CompilerDeclContext &decl_ctx)
lldb::TypeSP ParseType(const lldb_private::SymbolContext &sc, const DWARFDIE &die, bool *type_is_new)
static lldb_private::CompilerDecl GetDecl(const DWARFDIE &die)
llvm::StringMap< DIERefSet > NameToOffsetMap
static void DebuggerInitialize(lldb_private::Debugger &debugger)
virtual void LoadSectionData(lldb::SectionType sect_type, lldb_private::DWARFDataExtractor &data)
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
uint32_t CalculateNumCompileUnits() override
static llvm::StringRef GetPluginNameStatic()
llvm::DenseMap< dw_offset_t, lldb_private::FileSpecList > m_type_unit_support_files
lldb_private::Type * ResolveTypeUID(lldb::user_id_t type_uid) override
static lldb::LanguageType GetLanguage(DWARFUnit &unit)
std::optional< uint64_t > m_file_index
If this DWARF file a .DWO file or a DWARF .o file on mac when no dSYM file is being used,...
bool ClassOrStructIsVirtual(const DWARFDIE &die)
std::shared_ptr< SymbolFileDWARFDwo > m_dwp_symfile
std::unique_ptr< DWARFDebugRanges > m_ranges
void FindGlobalVariables(lldb_private::ConstString name, const lldb_private::CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, lldb_private::VariableList &variables) override
bool GetFunction(const DWARFDIE &die, lldb_private::SymbolContext &sc)
static lldb_private::SymbolFile * CreateInstance(lldb::ObjectFileSP objfile_sp)
lldb_private::XcodeSDK ParseXcodeSDK(lldb_private::CompileUnit &comp_unit) override
Return the Xcode SDK comp_unit was compiled against.
std::unordered_map< lldb::offset_t, lldb_private::DebugMacrosSP > DebugMacrosMap
lldb_private::StatsDuration m_parse_time
std::optional< uint64_t > GetDWOId()
If this is a DWARF object with a single CU, return its DW_AT_dwo_id.
uint32_t CalculateAbilities() override
SymbolFileDWARFDebugMap * GetDebugMapSymfile()
std::shared_ptr< SymbolFileDWARFDwo > GetDwoSymbolFileForCompileUnit(DWARFUnit &dwarf_cu, const DWARFDebugInfoEntry &cu_die)
std::set< DIERef > DIERefSet
bool m_fetched_external_modules
lldb::addr_t m_first_code_address
DWARF does not provide a good way for traditional (concatenating) linkers to invalidate debug info de...
llvm::StringRef GetPluginName() override
static DWARFDeclContext GetDWARFDeclContext(const DWARFDIE &die)
~SymbolFileDWARF() override
lldb_private::StatsDuration::Duration GetDebugInfoIndexTime() override
Return the time it took to index the debug information in the object file.
lldb_private::DWARFContext m_context
DWARFDebugInfo & DebugInfo()
void FindDwpSymbolFile()
lldb_private::Status CalculateFrameVariableError(lldb_private::StackFrame &frame) override
Subclasses will override this function to for GetFrameVariableError().
virtual lldb::TypeSP FindDefinitionTypeForDWARFDeclContext(const DWARFDIE &die)
static llvm::StringRef GetPluginDescriptionStatic()
std::vector< std::unique_ptr< lldb_private::CallEdge > > CollectCallEdges(lldb::ModuleSP module, DWARFDIE function_die)
Parse call site entries (DW_TAG_call_site), including any nested call site parameters (DW_TAG_call_si...
DIEArray MergeBlockAbstractParameters(const DWARFDIE &block_die, DIEArray &&variable_dies)
DWARFDIE GetDeclContextDIEContainingDIE(const DWARFDIE &die)
const ExternalTypeModuleMap & getExternalTypeModules() const
Return the list of Clang modules imported by this SymbolFile.
void ResolveFunctionAndBlock(lldb::addr_t file_vm_addr, bool lookup_block, lldb_private::SymbolContext &sc)
Resolve functions and (possibly) blocks for the given file address and a compile unit.
llvm::once_flag m_info_once_flag
void InitializeObject() override
Initialize the SymbolFile object.
static llvm::Expected< lldb::TypeSystemSP > GetTypeSystem(DWARFUnit &unit)
std::vector< uint32_t > m_lldb_cu_to_dwarf_unit
lldb_private::Symbol * GetObjCClassSymbol(lldb_private::ConstString objc_class_name)
DIEToClangType m_forward_decl_die_to_clang_type
void GetMangledNamesForFunction(const std::string &scope_qualified_name, std::vector< lldb_private::ConstString > &mangled_names) override
std::atomic_flag m_dwo_warning_issued
void PreloadSymbols() override
lldb::VariableSP ParseVariableDIE(const lldb_private::SymbolContext &sc, const DWARFDIE &die, const lldb::addr_t func_low_pc)
lldb_private::TypeList & GetTypeList() override
std::unique_ptr< lldb_private::DWARFIndex > m_index
std::vector< std::unique_ptr< lldb_private::CallEdge > > ParseCallEdgesInFunction(lldb_private::UserID func_id) override
llvm::once_flag m_dwp_symfile_once_flag
lldb::CompUnitSP ParseCompileUnit(DWARFCompileUnit &dwarf_cu)
lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override
llvm::SetVector< lldb_private::Type * > TypeSet
static lldb::LanguageType LanguageTypeFromDWARF(uint64_t val)
void DumpClangAST(lldb_private::Stream &s) override
bool ParseSupportFiles(lldb_private::CompileUnit &comp_unit, lldb_private::FileSpecList &support_files) override
static DWARFDIE GetParentSymbolContextDIE(const DWARFDIE &die)
lldb::addr_t FixupAddress(lldb::addr_t file_addr)
If this symbol file is linked to by a debug map (see SymbolFileDWARFDebugMap), and file_addr is a fil...
static void Terminate()
llvm::Expected< lldb::TypeSystemSP > GetTypeSystemForLanguage(lldb::LanguageType language) override
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb::opaque_compiler_type_t > DIEToClangType
lldb_private::DWARFContext & GetDWARFContext()
lldb_private::CompilerDecl GetDeclForUID(lldb::user_id_t uid) override
std::unique_ptr< DWARFDebugInfo > m_info
virtual void GetObjCMethods(lldb_private::ConstString class_name, llvm::function_ref< bool(DWARFDIE die)> callback)
virtual DIEToTypePtr & GetDIEToType()
void GetTypes(lldb_private::SymbolContextScope *sc_scope, lldb::TypeClass type_mask, lldb_private::TypeList &type_list) override
lldb_private::CompilerDeclContext GetDeclContextForUID(lldb::user_id_t uid) override
void SetDebugMapModule(const lldb::ModuleSP &module_sp)
void ParseAndAppendGlobalVariable(const lldb_private::SymbolContext &sc, const DWARFDIE &die, lldb_private::VariableList &cc_variable_list)
virtual ClangTypeToDIE & GetForwardDeclClangTypeToDie()
lldb::ModuleWP m_debug_map_module_wp
lldb::VariableSP ParseVariableDIECached(const lldb_private::SymbolContext &sc, const DWARFDIE &die)
SymbolFileDWARFDebugMap * m_debug_map_symfile
DIEToTypePtr m_die_to_type
llvm::DWARFDebugAbbrev * DebugAbbrev()
bool ParseLineTable(lldb_private::CompileUnit &comp_unit) override
UniqueDWARFASTTypeMap m_unique_ast_type_map
void ParseDeclsForContext(lldb_private::CompilerDeclContext decl_ctx) override
bool DIEDeclContextsMatch(const DWARFDIE &die1, const DWARFDIE &die2)
bool ParseDebugMacros(lldb_private::CompileUnit &comp_unit) override
llvm::DenseMap< lldb::opaque_compiler_type_t, DIERef > ClangTypeToDIE
lldb_private::LazyBool m_supports_DW_AT_APPLE_objc_complete_type
static lldb_private::CompilerDeclContext GetDeclContext(const DWARFDIE &die)
lldb_private::StatsDuration::Duration GetDebugInfoParseTime() override
Return the time taken to parse the debug information.
bool ParseIsOptimized(lldb_private::CompileUnit &comp_unit) override
virtual UniqueDWARFASTTypeMap & GetUniqueDWARFASTTypeMap()
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
A section + offset based address class.
Definition: Address.h:59
A class that describes a single lexical block.
Definition: Block.h:41
A class that describes a compilation unit.
Definition: CompileUnit.h:41
Represents a generic declaration context in a program.
Represents a generic declaration such as a function declaration.
Definition: CompilerDecl.h:28
Generic representation of a type in a programming language.
Definition: CompilerType.h:36
A uniqued constant string class.
Definition: ConstString.h:40
An data extractor class.
Definition: DataExtractor.h:48
A class to manage flag bits.
Definition: Debugger.h:79
"lldb/Target/ExecutionContext.h" A class that contains an execution context.
A file collection class.
Definition: FileSpecList.h:24
A file utility class.
Definition: FileSpec.h:56
A class that describes a function.
Definition: Function.h:399
A class that encapsulates name lookup information.
Definition: Module.h:949
A class that describes an executable image and its associated object and symbol files.
Definition: Module.h:88
"lldb/Core/SourceLocationSpec.h" A source location specifier class.
This base class provides an interface to stack frames.
Definition: StackFrame.h:41
std::chrono::duration< double > Duration
Definition: Statistics.h:31
An error handling class.
Definition: Status.h:44
A stream class that can stream formatted output to a file.
Definition: Stream.h:28
Defines a list of symbol context objects.
"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.
Definition: SymbolContext.h:33
Containing protected virtual methods for child classes to override.
Definition: SymbolFile.h:469
Provides public interface for all SymbolFiles.
Definition: SymbolFile.h:49
std::unordered_map< lldb::CompUnitSP, Args > GetCompileOptions()
Returns a map of compilation unit to the compile option arguments associated with that compilation un...
Definition: SymbolFile.h:450
An abstraction for Xcode-style SDKs that works like ArchSpec.
Definition: XcodeSDK.h:24
uint64_t dw_offset_t
Definition: dwarf.h:31
#define LLDB_INVALID_ADDRESS
Definition: lldb-defines.h:79
#define LLDB_INVALID_OFFSET
Definition: lldb-defines.h:90
std::shared_ptr< DebugMacros > DebugMacrosSP
Definition: DebugMacros.h:22
void * opaque_compiler_type_t
Definition: lldb-types.h:86
std::weak_ptr< lldb_private::Module > ModuleWP
Definition: lldb-forward.h:355
uint64_t offset_t
Definition: lldb-types.h:83
std::shared_ptr< lldb_private::ObjectFile > ObjectFileSP
Definition: lldb-forward.h:356
LanguageType
Programming language type.
std::shared_ptr< lldb_private::Type > TypeSP
Definition: lldb-forward.h:436
std::shared_ptr< lldb_private::Variable > VariableSP
Definition: lldb-forward.h:460
uint64_t user_id_t
Definition: lldb-types.h:80
uint64_t addr_t
Definition: lldb-types.h:79
std::shared_ptr< lldb_private::Module > ModuleSP
Definition: lldb-forward.h:354
std::shared_ptr< lldb_private::CompileUnit > CompUnitSP
Definition: lldb-forward.h:317
Definition: Debugger.h:53
A SmallBitVector that represents a set of source languages (lldb::LanguageType).
Definition: TypeSystem.h:45
A mix in class that contains a generic user ID.
Definition: UserID.h:31