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 
23 #include "lldb/Core/UniqueCStringMap.h"
24 #include "lldb/Core/dwarf.h"
25 #include "lldb/Expression/DWARFExpressionList.h"
26 #include "lldb/Symbol/DebugMacros.h"
27 #include "lldb/Symbol/SymbolContext.h"
28 #include "lldb/Symbol/SymbolFile.h"
29 #include "lldb/Target/Statistics.h"
30 #include "lldb/Utility/ConstString.h"
31 #include "lldb/Utility/Flags.h"
32 #include "lldb/Utility/RangeMap.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
42 class DebugMapModule;
43 class DWARFCompileUnit;
44 class DWARFDebugAbbrev;
45 class DWARFDebugAranges;
46 class DWARFDebugInfo;
47 class DWARFDebugInfoEntry;
48 class DWARFDebugLine;
49 class DWARFDebugRanges;
50 class DWARFDeclContext;
51 class DWARFFormValue;
52 class DWARFTypeUnit;
53 class SymbolFileDWARFDebugMap;
54 class SymbolFileDWARFDwo;
55 class SymbolFileDWARFDwp;
56 class UserID;
57 
58 #define DIE_IS_BEING_PARSED ((lldb_private::Type *)1)
59 
60 class SymbolFileDWARF : public lldb_private::SymbolFileCommon {
61   /// LLVM RTTI support.
62   static char ID;
63 
64 public:
65   /// LLVM RTTI support.
66   /// \{
67   bool isA(const void *ClassID) const override {
68     return ClassID == &ID || SymbolFileCommon::isA(ClassID);
69   }
70   static bool classof(const SymbolFile *obj) { return obj->isA(&ID); }
71   /// \}
72 
73   friend class SymbolFileDWARFDebugMap;
74   friend class SymbolFileDWARFDwo;
75   friend class DebugMapModule;
76   friend class DWARFCompileUnit;
77   friend class DWARFDIE;
78   friend class DWARFASTParserClang;
79 
80   // Static Functions
81   static void Initialize();
82 
83   static void Terminate();
84 
85   static void DebuggerInitialize(lldb_private::Debugger &debugger);
86 
87   static llvm::StringRef GetPluginNameStatic() { return "dwarf"; }
88 
89   static llvm::StringRef GetPluginDescriptionStatic();
90 
91   static lldb_private::SymbolFile *
92   CreateInstance(lldb::ObjectFileSP objfile_sp);
93 
94   // Constructors and Destructors
95 
96   SymbolFileDWARF(lldb::ObjectFileSP objfile_sp,
97                   lldb_private::SectionList *dwo_section_list);
98 
99   ~SymbolFileDWARF() override;
100 
101   uint32_t CalculateAbilities() override;
102 
103   void InitializeObject() override;
104 
105   // Compile Unit function calls
106 
107   lldb::LanguageType
108   ParseLanguage(lldb_private::CompileUnit &comp_unit) override;
109 
110   lldb_private::XcodeSDK
111   ParseXcodeSDK(lldb_private::CompileUnit &comp_unit) override;
112 
113   size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override;
114 
115   bool ParseLineTable(lldb_private::CompileUnit &comp_unit) override;
116 
117   bool ParseDebugMacros(lldb_private::CompileUnit &comp_unit) override;
118 
119   bool ForEachExternalModule(
120       lldb_private::CompileUnit &, llvm::DenseSet<lldb_private::SymbolFile *> &,
121       llvm::function_ref<bool(lldb_private::Module &)>) override;
122 
123   bool ParseSupportFiles(lldb_private::CompileUnit &comp_unit,
124                          lldb_private::FileSpecList &support_files) override;
125 
126   bool ParseIsOptimized(lldb_private::CompileUnit &comp_unit) override;
127 
128   size_t ParseTypes(lldb_private::CompileUnit &comp_unit) override;
129 
130   bool ParseImportedModules(
131       const lldb_private::SymbolContext &sc,
132       std::vector<lldb_private::SourceModule> &imported_modules) override;
133 
134   size_t ParseBlocksRecursive(lldb_private::Function &func) override;
135 
136   size_t
137   ParseVariablesForContext(const lldb_private::SymbolContext &sc) override;
138 
139   lldb_private::Type *ResolveTypeUID(lldb::user_id_t type_uid) override;
140   std::optional<ArrayInfo> GetDynamicArrayInfoForUID(
141       lldb::user_id_t type_uid,
142       const lldb_private::ExecutionContext *exe_ctx) override;
143 
144   bool CompleteType(lldb_private::CompilerType &compiler_type) override;
145 
146   lldb_private::Type *ResolveType(const DWARFDIE &die,
147                                   bool assert_not_being_parsed = true,
148                                   bool resolve_function_context = false);
149 
150   lldb_private::CompilerDecl GetDeclForUID(lldb::user_id_t uid) override;
151 
152   lldb_private::CompilerDeclContext
153   GetDeclContextForUID(lldb::user_id_t uid) override;
154 
155   lldb_private::CompilerDeclContext
156   GetDeclContextContainingUID(lldb::user_id_t uid) override;
157 
158   void
159   ParseDeclsForContext(lldb_private::CompilerDeclContext decl_ctx) override;
160 
161   uint32_t ResolveSymbolContext(const lldb_private::Address &so_addr,
162                                 lldb::SymbolContextItem resolve_scope,
163                                 lldb_private::SymbolContext &sc) override;
164 
165   lldb_private::Status
166   CalculateFrameVariableError(lldb_private::StackFrame &frame) override;
167 
168   uint32_t ResolveSymbolContext(
169       const lldb_private::SourceLocationSpec &src_location_spec,
170       lldb::SymbolContextItem resolve_scope,
171       lldb_private::SymbolContextList &sc_list) override;
172 
173   void
174   FindGlobalVariables(lldb_private::ConstString name,
175                       const lldb_private::CompilerDeclContext &parent_decl_ctx,
176                       uint32_t max_matches,
177                       lldb_private::VariableList &variables) override;
178 
179   void FindGlobalVariables(const lldb_private::RegularExpression &regex,
180                            uint32_t max_matches,
181                            lldb_private::VariableList &variables) override;
182 
183   void FindFunctions(const lldb_private::Module::LookupInfo &lookup_info,
184                      const lldb_private::CompilerDeclContext &parent_decl_ctx,
185                      bool include_inlines,
186                      lldb_private::SymbolContextList &sc_list) override;
187 
188   void FindFunctions(const lldb_private::RegularExpression &regex,
189                      bool include_inlines,
190                      lldb_private::SymbolContextList &sc_list) override;
191 
192   void GetMangledNamesForFunction(
193       const std::string &scope_qualified_name,
194       std::vector<lldb_private::ConstString> &mangled_names) override;
195 
196   void
197   FindTypes(lldb_private::ConstString name,
198             const lldb_private::CompilerDeclContext &parent_decl_ctx,
199             uint32_t max_matches,
200             llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
201             lldb_private::TypeMap &types) override;
202 
203   void FindTypes(llvm::ArrayRef<lldb_private::CompilerContext> pattern,
204                  lldb_private::LanguageSet languages,
205                  llvm::DenseSet<SymbolFile *> &searched_symbol_files,
206                  lldb_private::TypeMap &types) override;
207 
208   void GetTypes(lldb_private::SymbolContextScope *sc_scope,
209                 lldb::TypeClass type_mask,
210                 lldb_private::TypeList &type_list) override;
211 
212   llvm::Expected<lldb::TypeSystemSP>
213   GetTypeSystemForLanguage(lldb::LanguageType language) override;
214 
215   lldb_private::CompilerDeclContext
216   FindNamespace(lldb_private::ConstString name,
217                 const lldb_private::CompilerDeclContext &parent_decl_ctx,
218                 bool only_root_namespaces) override;
219 
220   void PreloadSymbols() override;
221 
222   std::recursive_mutex &GetModuleMutex() const override;
223 
224   // PluginInterface protocol
225   llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
226 
227   DWARFDebugAbbrev *DebugAbbrev();
228 
229   DWARFDebugInfo &DebugInfo();
230 
231   DWARFDebugRanges *GetDebugRanges();
232 
233   static bool SupportedVersion(uint16_t version);
234 
235   DWARFDIE
236   GetDeclContextDIEContainingDIE(const DWARFDIE &die);
237 
238   bool
239   HasForwardDeclForClangType(const lldb_private::CompilerType &compiler_type);
240 
241   lldb_private::CompileUnit *
242   GetCompUnitForDWARFCompUnit(DWARFCompileUnit &dwarf_cu);
243 
244   virtual void GetObjCMethods(lldb_private::ConstString class_name,
245                               llvm::function_ref<bool(DWARFDIE die)> callback);
246 
247   bool Supports_DW_AT_APPLE_objc_complete_type(DWARFUnit *cu);
248 
249   lldb_private::DebugMacrosSP ParseDebugMacros(lldb::offset_t *offset);
250 
251   static DWARFDIE GetParentSymbolContextDIE(const DWARFDIE &die);
252 
253   lldb::ModuleSP GetExternalModule(lldb_private::ConstString name);
254 
255   typedef std::map<lldb_private::ConstString, lldb::ModuleSP>
256       ExternalTypeModuleMap;
257 
258   /// Return the list of Clang modules imported by this SymbolFile.
259   const ExternalTypeModuleMap &getExternalTypeModules() const {
260     return m_external_type_modules;
261   }
262 
263   virtual DWARFDIE GetDIE(const DIERef &die_ref);
264 
265   DWARFDIE GetDIE(lldb::user_id_t uid);
266 
267   std::shared_ptr<SymbolFileDWARFDwo>
268   GetDwoSymbolFileForCompileUnit(DWARFUnit &dwarf_cu,
269                                  const DWARFDebugInfoEntry &cu_die);
270 
271   /// If this is a DWARF object with a single CU, return its DW_AT_dwo_id.
272   std::optional<uint64_t> GetDWOId();
273 
274   static bool
275   DIEInDeclContext(const lldb_private::CompilerDeclContext &parent_decl_ctx,
276                    const DWARFDIE &die, bool only_root_namespaces = false);
277 
278   std::vector<std::unique_ptr<lldb_private::CallEdge>>
279   ParseCallEdgesInFunction(lldb_private::UserID func_id) override;
280 
281   void Dump(lldb_private::Stream &s) override;
282 
283   void DumpClangAST(lldb_private::Stream &s) override;
284 
285   lldb_private::DWARFContext &GetDWARFContext() { return m_context; }
286 
287   const std::shared_ptr<SymbolFileDWARFDwo> &GetDwpSymbolFile();
288 
289   lldb_private::FileSpec GetFile(DWARFUnit &unit, size_t file_idx);
290 
291   static llvm::Expected<lldb::TypeSystemSP> GetTypeSystem(DWARFUnit &unit);
292 
293   static DWARFASTParser *GetDWARFParser(DWARFUnit &unit);
294 
295   // CompilerDecl related functions
296 
297   static lldb_private::CompilerDecl GetDecl(const DWARFDIE &die);
298 
299   static lldb_private::CompilerDeclContext GetDeclContext(const DWARFDIE &die);
300 
301   static lldb_private::CompilerDeclContext
302   GetContainingDeclContext(const DWARFDIE &die);
303 
304   static DWARFDeclContext GetDWARFDeclContext(const DWARFDIE &die);
305 
306   static lldb::LanguageType LanguageTypeFromDWARF(uint64_t val);
307 
308   static lldb::LanguageType GetLanguage(DWARFUnit &unit);
309   /// Same as GetLanguage() but reports all C++ versions as C++ (no version).
310   static lldb::LanguageType GetLanguageFamily(DWARFUnit &unit);
311 
312   lldb_private::StatsDuration::Duration GetDebugInfoParseTime() override {
313     return m_parse_time;
314   }
315   lldb_private::StatsDuration::Duration GetDebugInfoIndexTime() override;
316 
317   lldb_private::StatsDuration &GetDebugInfoParseTimeRef() {
318     return m_parse_time;
319   }
320 
321   virtual lldb::offset_t
322   GetVendorDWARFOpcodeSize(const lldb_private::DataExtractor &data,
323                            const lldb::offset_t data_offset,
324                            const uint8_t op) const {
325     return LLDB_INVALID_OFFSET;
326   }
327 
328   virtual bool
329   ParseVendorDWARFOpcode(uint8_t op, const lldb_private::DataExtractor &opcodes,
330                          lldb::offset_t &offset,
331                          std::vector<lldb_private::Value> &stack) const {
332     return false;
333   }
334 
335   lldb_private::ConstString ConstructFunctionDemangledName(const DWARFDIE &die);
336 
337   std::optional<uint64_t> GetFileIndex() const { return m_file_index; }
338   void SetFileIndex(std::optional<uint64_t> file_index) {
339     m_file_index = file_index;
340   }
341 
342 protected:
343   typedef llvm::DenseMap<const DWARFDebugInfoEntry *, lldb_private::Type *>
344       DIEToTypePtr;
345   typedef llvm::DenseMap<const DWARFDebugInfoEntry *, lldb::VariableSP>
346       DIEToVariableSP;
347   typedef llvm::DenseMap<const DWARFDebugInfoEntry *,
348                          lldb::opaque_compiler_type_t>
349       DIEToClangType;
350   typedef llvm::DenseMap<lldb::opaque_compiler_type_t, DIERef> ClangTypeToDIE;
351 
352   SymbolFileDWARF(const SymbolFileDWARF &) = delete;
353   const SymbolFileDWARF &operator=(const SymbolFileDWARF &) = delete;
354 
355   virtual void LoadSectionData(lldb::SectionType sect_type,
356                                lldb_private::DWARFDataExtractor &data);
357 
358   bool DeclContextMatchesThisSymbolFile(
359       const lldb_private::CompilerDeclContext &decl_ctx);
360 
361   uint32_t CalculateNumCompileUnits() override;
362 
363   lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
364 
365   lldb_private::TypeList &GetTypeList() override;
366 
367   lldb::CompUnitSP ParseCompileUnit(DWARFCompileUnit &dwarf_cu);
368 
369   virtual DWARFCompileUnit *
370   GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit);
371 
372   DWARFUnit *GetNextUnparsedDWARFCompileUnit(DWARFUnit *prev_cu);
373 
374   bool GetFunction(const DWARFDIE &die, lldb_private::SymbolContext &sc);
375 
376   lldb_private::Function *ParseFunction(lldb_private::CompileUnit &comp_unit,
377                                         const DWARFDIE &die);
378 
379   size_t ParseBlocksRecursive(lldb_private::CompileUnit &comp_unit,
380                               lldb_private::Block *parent_block,
381                               const DWARFDIE &die,
382                               lldb::addr_t subprogram_low_pc, uint32_t depth);
383 
384   size_t ParseTypes(const lldb_private::SymbolContext &sc, const DWARFDIE &die,
385                     bool parse_siblings, bool parse_children);
386 
387   lldb::TypeSP ParseType(const lldb_private::SymbolContext &sc,
388                          const DWARFDIE &die, bool *type_is_new);
389 
390   bool ParseSupportFiles(DWARFUnit &dwarf_cu, const lldb::ModuleSP &module,
391                          lldb_private::FileSpecList &support_files);
392 
393   lldb_private::Type *ResolveTypeUID(const DWARFDIE &die,
394                                      bool assert_not_being_parsed);
395 
396   lldb_private::Type *ResolveTypeUID(const DIERef &die_ref);
397 
398   lldb::VariableSP ParseVariableDIE(const lldb_private::SymbolContext &sc,
399                                     const DWARFDIE &die,
400                                     const lldb::addr_t func_low_pc);
401   lldb::VariableSP ParseVariableDIECached(const lldb_private::SymbolContext &sc,
402                                           const DWARFDIE &die);
403 
404   void
405   ParseAndAppendGlobalVariable(const lldb_private::SymbolContext &sc,
406                                const DWARFDIE &die,
407                                lldb_private::VariableList &cc_variable_list);
408 
409   size_t ParseVariablesInFunctionContext(const lldb_private::SymbolContext &sc,
410                                          const DWARFDIE &die,
411                                          const lldb::addr_t func_low_pc);
412 
413   size_t ParseVariablesInFunctionContextRecursive(
414       const lldb_private::SymbolContext &sc, const DWARFDIE &die,
415       lldb::addr_t func_low_pc, DIEArray &accumulator);
416 
417   size_t PopulateBlockVariableList(lldb_private::VariableList &variable_list,
418                                    const lldb_private::SymbolContext &sc,
419                                    llvm::ArrayRef<DIERef> variable_dies,
420                                    lldb::addr_t func_low_pc);
421 
422   DIEArray MergeBlockAbstractParameters(const DWARFDIE &block_die,
423                                         DIEArray &&variable_dies);
424 
425   bool ClassOrStructIsVirtual(const DWARFDIE &die);
426 
427   // Given a die_offset, figure out the symbol context representing that die.
428   bool ResolveFunction(const DWARFDIE &die, bool include_inlines,
429                        lldb_private::SymbolContextList &sc_list);
430 
431   /// Resolve functions and (possibly) blocks for the given file address and a
432   /// compile unit. The compile unit comes from the sc argument and it must be
433   /// set. The results of the lookup (if any) are written back to the symbol
434   /// context.
435   void ResolveFunctionAndBlock(lldb::addr_t file_vm_addr, bool lookup_block,
436                                lldb_private::SymbolContext &sc);
437 
438   virtual lldb::TypeSP
439   FindDefinitionTypeForDWARFDeclContext(const DWARFDIE &die);
440 
441   virtual lldb::TypeSP
442   FindCompleteObjCDefinitionTypeForDIE(const DWARFDIE &die,
443                                        lldb_private::ConstString type_name,
444                                        bool must_be_implementation);
445 
446   lldb_private::Symbol *
447   GetObjCClassSymbol(lldb_private::ConstString objc_class_name);
448 
449   lldb::TypeSP GetTypeForDIE(const DWARFDIE &die,
450                              bool resolve_function_context = false);
451 
452   void SetDebugMapModule(const lldb::ModuleSP &module_sp) {
453     m_debug_map_module_wp = module_sp;
454   }
455 
456   SymbolFileDWARFDebugMap *GetDebugMapSymfile();
457 
458   DWARFDIE
459   FindBlockContainingSpecification(const DIERef &func_die_ref,
460                                    dw_offset_t spec_block_die_offset);
461 
462   DWARFDIE
463   FindBlockContainingSpecification(const DWARFDIE &die,
464                                    dw_offset_t spec_block_die_offset);
465 
466   virtual UniqueDWARFASTTypeMap &GetUniqueDWARFASTTypeMap();
467 
468   bool DIEDeclContextsMatch(const DWARFDIE &die1, const DWARFDIE &die2);
469 
470   bool ClassContainsSelector(const DWARFDIE &class_die,
471                              lldb_private::ConstString selector);
472 
473   /// Parse call site entries (DW_TAG_call_site), including any nested call site
474   /// parameters (DW_TAG_call_site_parameter).
475   std::vector<std::unique_ptr<lldb_private::CallEdge>>
476   CollectCallEdges(lldb::ModuleSP module, DWARFDIE function_die);
477 
478   /// If this symbol file is linked to by a debug map (see
479   /// SymbolFileDWARFDebugMap), and \p file_addr is a file address relative to
480   /// an object file, adjust \p file_addr so that it is relative to the main
481   /// binary. Returns the adjusted address, or \p file_addr if no adjustment is
482   /// needed, on success and LLDB_INVALID_ADDRESS otherwise.
483   lldb::addr_t FixupAddress(lldb::addr_t file_addr);
484 
485   bool FixupAddress(lldb_private::Address &addr);
486 
487   typedef llvm::SetVector<lldb_private::Type *> TypeSet;
488 
489   void GetTypes(const DWARFDIE &die, dw_offset_t min_die_offset,
490                 dw_offset_t max_die_offset, uint32_t type_mask,
491                 TypeSet &type_set);
492 
493   typedef lldb_private::RangeDataVector<lldb::addr_t, lldb::addr_t,
494                                         lldb_private::Variable *>
495       GlobalVariableMap;
496 
497   GlobalVariableMap &GetGlobalAranges();
498 
499   void UpdateExternalModuleListIfNeeded();
500 
501   virtual DIEToTypePtr &GetDIEToType() { return m_die_to_type; }
502 
503   virtual DIEToVariableSP &GetDIEToVariable() { return m_die_to_variable_sp; }
504 
505   virtual DIEToClangType &GetForwardDeclDieToClangType() {
506     return m_forward_decl_die_to_clang_type;
507   }
508 
509   virtual ClangTypeToDIE &GetForwardDeclClangTypeToDie() {
510     return m_forward_decl_clang_type_to_die;
511   }
512 
513   void BuildCuTranslationTable();
514   std::optional<uint32_t> GetDWARFUnitIndex(uint32_t cu_idx);
515 
516   void FindDwpSymbolFile();
517 
518   const lldb_private::FileSpecList &GetTypeUnitSupportFiles(DWARFTypeUnit &tu);
519 
520   void InitializeFirstCodeAddressRecursive(
521       const lldb_private::SectionList &section_list);
522 
523   void InitializeFirstCodeAddress();
524 
525   void GetCompileOptions(
526       std::unordered_map<lldb::CompUnitSP, lldb_private::Args> &args) override;
527 
528   lldb::ModuleWP m_debug_map_module_wp;
529   SymbolFileDWARFDebugMap *m_debug_map_symfile;
530 
531   llvm::once_flag m_dwp_symfile_once_flag;
532   std::shared_ptr<SymbolFileDWARFDwo> m_dwp_symfile;
533 
534   lldb_private::DWARFContext m_context;
535 
536   llvm::once_flag m_info_once_flag;
537   std::unique_ptr<DWARFDebugInfo> m_info;
538 
539   std::unique_ptr<DWARFDebugAbbrev> m_abbr;
540   std::unique_ptr<GlobalVariableMap> m_global_aranges_up;
541 
542   typedef std::unordered_map<lldb::offset_t, lldb_private::DebugMacrosSP>
543       DebugMacrosMap;
544   DebugMacrosMap m_debug_macros_map;
545 
546   ExternalTypeModuleMap m_external_type_modules;
547   std::unique_ptr<lldb_private::DWARFIndex> m_index;
548   bool m_fetched_external_modules : 1;
549   lldb_private::LazyBool m_supports_DW_AT_APPLE_objc_complete_type;
550 
551   typedef std::set<DIERef> DIERefSet;
552   typedef llvm::StringMap<DIERefSet> NameToOffsetMap;
553   NameToOffsetMap m_function_scope_qualified_name_map;
554   std::unique_ptr<DWARFDebugRanges> m_ranges;
555   UniqueDWARFASTTypeMap m_unique_ast_type_map;
556   DIEToTypePtr m_die_to_type;
557   DIEToVariableSP m_die_to_variable_sp;
558   DIEToClangType m_forward_decl_die_to_clang_type;
559   ClangTypeToDIE m_forward_decl_clang_type_to_die;
560   llvm::DenseMap<dw_offset_t, lldb_private::FileSpecList>
561       m_type_unit_support_files;
562   std::vector<uint32_t> m_lldb_cu_to_dwarf_unit;
563   /// DWARF does not provide a good way for traditional (concatenating) linkers
564   /// to invalidate debug info describing dead-stripped code. These linkers will
565   /// keep the debug info but resolve any addresses referring to such code as
566   /// zero (BFD) or a small positive integer (zero + relocation addend -- GOLD).
567   /// Try to filter out this debug info by comparing it to the lowest code
568   /// address in the module.
569   lldb::addr_t m_first_code_address = LLDB_INVALID_ADDRESS;
570   lldb_private::StatsDuration m_parse_time;
571   std::atomic_flag m_dwo_warning_issued = ATOMIC_FLAG_INIT;
572   /// If this DWARF file a .DWO file or a DWARF .o file on mac when
573   /// no dSYM file is being used, this file index will be set to a
574   /// valid value that can be used in DIERef objects which will contain
575   /// an index that identifies the .DWO or .o file.
576   std::optional<uint64_t> m_file_index;
577 };
578 
579 #endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_SYMBOLFILEDWARF_H
580