SymbolFileDWARFDwo.h revision 344779
1//===-- SymbolFileDWARFDwo.h ------------------------------------*- C++ -*-===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef SymbolFileDWARFDwo_SymbolFileDWARFDwo_h_
11#define SymbolFileDWARFDwo_SymbolFileDWARFDwo_h_
12
13#include "SymbolFileDWARF.h"
14
15class SymbolFileDWARFDwo : public SymbolFileDWARF {
16public:
17  SymbolFileDWARFDwo(lldb::ObjectFileSP objfile, DWARFUnit *dwarf_cu);
18
19  ~SymbolFileDWARFDwo() override = default;
20
21  lldb::CompUnitSP ParseCompileUnit(DWARFUnit *dwarf_cu,
22                                    uint32_t cu_idx) override;
23
24  DWARFUnit *GetCompileUnit();
25
26  DWARFUnit *
27  GetDWARFCompileUnit(lldb_private::CompileUnit *comp_unit) override;
28
29  lldb_private::DWARFExpression::LocationListFormat
30  GetLocationListFormat() const override;
31
32  size_t GetObjCMethodDIEOffsets(lldb_private::ConstString class_name,
33                                 DIEArray &method_die_offsets) override;
34
35  lldb_private::TypeSystem *
36  GetTypeSystemForLanguage(lldb::LanguageType language) override;
37
38  DWARFDIE
39  GetDIE(const DIERef &die_ref) override;
40
41  std::unique_ptr<SymbolFileDWARFDwo>
42  GetDwoSymbolFileForCompileUnit(DWARFUnit &dwarf_cu,
43                                 const DWARFDebugInfoEntry &cu_die) override {
44    return nullptr;
45  }
46
47  DWARFUnit *GetBaseCompileUnit() override;
48
49  const lldb_private::DWARFDataExtractor &get_debug_abbrev_data() override;
50  const lldb_private::DWARFDataExtractor &get_debug_addr_data() override;
51  const lldb_private::DWARFDataExtractor &get_debug_info_data() override;
52  const lldb_private::DWARFDataExtractor &get_debug_str_data() override;
53  const lldb_private::DWARFDataExtractor &get_debug_str_offsets_data() override;
54
55protected:
56  void LoadSectionData(lldb::SectionType sect_type,
57                       lldb_private::DWARFDataExtractor &data) override;
58
59  DIEToTypePtr &GetDIEToType() override;
60
61  DIEToVariableSP &GetDIEToVariable() override;
62
63  DIEToClangType &GetForwardDeclDieToClangType() override;
64
65  ClangTypeToDIE &GetForwardDeclClangTypeToDie() override;
66
67  UniqueDWARFASTTypeMap &GetUniqueDWARFASTTypeMap() override;
68
69  lldb::TypeSP FindDefinitionTypeForDWARFDeclContext(
70      const DWARFDeclContext &die_decl_ctx) override;
71
72  lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE(
73      const DWARFDIE &die, const lldb_private::ConstString &type_name,
74      bool must_be_implementation) override;
75
76  SymbolFileDWARF *GetBaseSymbolFile();
77
78  lldb::ObjectFileSP m_obj_file_sp;
79  DWARFUnit *m_base_dwarf_cu;
80};
81
82#endif // SymbolFileDWARFDwo_SymbolFileDWARFDwo_h_
83