LLDB  mainline
SymbolFileDWARFDwo.h
Go to the documentation of this file.
1 //===-- SymbolFileDWARFDwo.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_SYMBOLFILEDWARFDWO_H
10 #define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_SYMBOLFILEDWARFDWO_H
11 
12 #include "SymbolFileDWARF.h"
13 
15  /// LLVM RTTI support.
16  static char ID;
17 
18 public:
19  /// LLVM RTTI support.
20  /// \{
21  bool isA(const void *ClassID) const override {
22  return ClassID == &ID || SymbolFileDWARF::isA(ClassID);
23  }
24  static bool classof(const SymbolFile *obj) { return obj->isA(&ID); }
25  /// \}
26 
28  lldb::ObjectFileSP objfile, uint32_t id);
29 
30  ~SymbolFileDWARFDwo() override = default;
31 
33 
35  llvm::function_ref<bool(DWARFDIE die)> callback) override;
36 
37  llvm::Expected<lldb::TypeSystemSP>
39 
40  DWARFDIE
41  GetDIE(const DIERef &die_ref) override;
42 
43  llvm::Optional<uint32_t> GetDwoNum() override { return GetID() >> 32; }
44 
47  const lldb::offset_t data_offset,
48  const uint8_t op) const override;
49 
51  uint8_t op, const lldb_private::DataExtractor &opcodes,
52  lldb::offset_t &offset,
53  std::vector<lldb_private::Value> &stack) const override;
54 
55 protected:
56  DIEToTypePtr &GetDIEToType() override;
57 
59 
61 
63 
65 
66  lldb::TypeSP
68 
70  const DWARFDIE &die, lldb_private::ConstString type_name,
71  bool must_be_implementation) override;
72 
74 
75  /// If this file contains exactly one compile unit, this function will return
76  /// it. Otherwise it returns nullptr.
78 
80 };
81 
82 #endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_SYMBOLFILEDWARFDWO_H
SymbolFileDWARFDwo::GetBaseSymbolFile
SymbolFileDWARF & GetBaseSymbolFile() const
Definition: SymbolFileDWARFDwo.h:73
SymbolFileDWARFDwo::ID
static char ID
LLVM RTTI support.
Definition: SymbolFileDWARFDwo.h:16
SymbolFileDWARF::SymbolFileDWARFDwo
friend class SymbolFileDWARFDwo
Definition: SymbolFileDWARF.h:75
lldb_private::SymbolFile::SymbolFile
SymbolFile()=default
DIERef
Identifies a DWARF debug info entry within a given Module.
Definition: DIERef.h:26
SymbolFileDWARFDwo::GetDIEToVariable
DIEToVariableSP & GetDIEToVariable() override
Definition: SymbolFileDWARFDwo.cpp:96
SymbolFileDWARFDwo::GetDwoNum
llvm::Optional< uint32_t > GetDwoNum() override
Definition: SymbolFileDWARFDwo.h:43
SymbolFileDWARFDwo::GetDIEToType
DIEToTypePtr & GetDIEToType() override
Definition: SymbolFileDWARFDwo.cpp:92
SymbolFileDWARF::DIEToClangType
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb::opaque_compiler_type_t > DIEToClangType
Definition: SymbolFileDWARF.h:356
SymbolFileDWARF
Definition: SymbolFileDWARF.h:60
SymbolFileDWARF.h
SymbolFileDWARFDwo::GetTypeSystemForLanguage
llvm::Expected< lldb::TypeSystemSP > GetTypeSystemForLanguage(lldb::LanguageType language) override
Definition: SymbolFileDWARFDwo.cpp:133
lldb::offset_t
uint64_t offset_t
Definition: lldb-types.h:87
SymbolFileDWARFDwo::GetObjCMethods
void GetObjCMethods(lldb_private::ConstString class_name, llvm::function_ref< bool(DWARFDIE die)> callback) override
Definition: SymbolFileDWARFDwo.cpp:110
SymbolFileDWARF::isA
bool isA(const void *ClassID) const override
LLVM RTTI support.
Definition: SymbolFileDWARF.h:68
DWARFDIE
Definition: DWARFDIE.h:16
DWARFCompileUnit
Definition: DWARFCompileUnit.h:15
lldb_private::DataExtractor
Definition: DataExtractor.h:48
SymbolFileDWARFDwo::FindSingleCompileUnit
DWARFCompileUnit * FindSingleCompileUnit()
If this file contains exactly one compile unit, this function will return it.
Definition: SymbolFileDWARFDwo.cpp:58
lldb_private::ConstString
Definition: ConstString.h:39
SymbolFileDWARF::DIEToTypePtr
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb_private::Type * > DIEToTypePtr
Definition: SymbolFileDWARF.h:351
SymbolFileDWARFDwo::GetForwardDeclDieToClangType
DIEToClangType & GetForwardDeclDieToClangType() override
Definition: SymbolFileDWARFDwo.cpp:101
SymbolFileDWARF::ClangTypeToDIE
llvm::DenseMap< lldb::opaque_compiler_type_t, DIERef > ClangTypeToDIE
Definition: SymbolFileDWARF.h:357
UniqueDWARFASTTypeMap
Definition: UniqueDWARFASTType.h:71
SymbolFileDWARFDwo::ParseVendorDWARFOpcode
bool ParseVendorDWARFOpcode(uint8_t op, const lldb_private::DataExtractor &opcodes, lldb::offset_t &offset, std::vector< lldb_private::Value > &stack) const override
Definition: SymbolFileDWARFDwo.cpp:86
lldb_private::UserID::GetID
lldb::user_id_t GetID() const
Get accessor for the user ID.
Definition: UserID.h:47
SymbolFileDWARFDwo::GetDIE
DWARFDIE GetDIE(const DIERef &die_ref) override
Definition: SymbolFileDWARFDwo.cpp:138
SymbolFileDWARFDwo::GetDWOCompileUnitForHash
DWARFCompileUnit * GetDWOCompileUnitForHash(uint64_t hash)
Definition: SymbolFileDWARFDwo.cpp:38
SymbolFileDWARF::DIEToVariableSP
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb::VariableSP > DIEToVariableSP
Definition: SymbolFileDWARF.h:353
SymbolFileDWARFDwo::FindDefinitionTypeForDWARFDeclContext
lldb::TypeSP FindDefinitionTypeForDWARFDeclContext(const DWARFDIE &die) override
Definition: SymbolFileDWARFDwo.cpp:121
SymbolFileDWARFDwo::~SymbolFileDWARFDwo
~SymbolFileDWARFDwo() override=default
SymbolFileDWARFDwo::GetUniqueDWARFASTTypeMap
UniqueDWARFASTTypeMap & GetUniqueDWARFASTTypeMap() override
Definition: SymbolFileDWARFDwo.cpp:116
uint32_t
SymbolFileDWARFDwo::classof
static bool classof(const SymbolFile *obj)
Definition: SymbolFileDWARFDwo.h:24
SymbolFileDWARFDwo::GetForwardDeclClangTypeToDie
ClangTypeToDIE & GetForwardDeclClangTypeToDie() override
Definition: SymbolFileDWARFDwo.cpp:106
SymbolFileDWARFDwo::isA
bool isA(const void *ClassID) const override
LLVM RTTI support.
Definition: SymbolFileDWARFDwo.h:21
SymbolFileDWARFDwo
Definition: SymbolFileDWARFDwo.h:14
SymbolFileDWARFDwo::FindCompleteObjCDefinitionTypeForDIE
lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE(const DWARFDIE &die, lldb_private::ConstString type_name, bool must_be_implementation) override
Definition: SymbolFileDWARFDwo.cpp:125
SymbolFileDWARFDwo::m_base_symbol_file
SymbolFileDWARF & m_base_symbol_file
Definition: SymbolFileDWARFDwo.h:79
SymbolFileDWARFDwo::GetVendorDWARFOpcodeSize
lldb::offset_t GetVendorDWARFOpcodeSize(const lldb_private::DataExtractor &data, const lldb::offset_t data_offset, const uint8_t op) const override
Definition: SymbolFileDWARFDwo.cpp:80
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:440