LLDB  mainline
SymbolFileDWARFDwp.h
Go to the documentation of this file.
1 //===-- SymbolFileDWARFDwp.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 SymbolFileDWARFDwp_SymbolFileDWARFDwp_h_
10 #define SymbolFileDWARFDwp_SymbolFileDWARFDwp_h_
11 
12 #include <memory>
13 
14 #include "llvm/DebugInfo/DWARF/DWARFUnitIndex.h"
15 
16 #include "lldb/Core/Module.h"
17 
18 #include "DWARFDataExtractor.h"
19 #include "SymbolFileDWARFDwo.h"
20 
22 public:
23  static std::unique_ptr<SymbolFileDWARFDwp>
24  Create(lldb::ModuleSP module_sp, const lldb_private::FileSpec &file_spec);
25 
26  std::unique_ptr<SymbolFileDWARFDwo>
27  GetSymbolFileForDwoId(DWARFUnit *dwarf_cu, uint64_t dwo_id);
28 
29  bool LoadSectionData(uint64_t dwo_id, lldb::SectionType sect_type,
31 
32 private:
33  explicit SymbolFileDWARFDwp(lldb::ModuleSP module_sp,
34  lldb::ObjectFileSP obj_file);
35 
36  bool LoadRawSectionData(lldb::SectionType sect_type,
38 
39  void InitDebugCUIndexMap();
40 
41  lldb::ObjectFileSP m_obj_file;
42 
43  std::mutex m_sections_mutex;
44  std::map<lldb::SectionType, lldb_private::DWARFDataExtractor> m_sections;
45 
46  llvm::DWARFUnitIndex m_debug_cu_index;
47  std::map<uint64_t, const llvm::DWARFUnitIndex::Entry *> m_debug_cu_index_map;
48 };
49 
50 #endif // SymbolFileDWARFDwp_SymbolFileDWARFDwp_h_
A file utility class.
Definition: FileSpec.h:55
bool LoadSectionData(uint64_t dwo_id, lldb::SectionType sect_type, lldb_private::DWARFDataExtractor &data)
std::unique_ptr< SymbolFileDWARFDwo > GetSymbolFileForDwoId(DWARFUnit *dwarf_cu, uint64_t dwo_id)
static std::unique_ptr< SymbolFileDWARFDwp > Create(lldb::ModuleSP module_sp, const lldb_private::FileSpec &file_spec)