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#include <optional>
14
15namespace lldb_private::plugin {
16namespace dwarf {
18 /// LLVM RTTI support.
19 static char ID;
20
21public:
22 /// LLVM RTTI support.
23 /// \{
24 bool isA(const void *ClassID) const override {
25 return ClassID == &ID || SymbolFileDWARF::isA(ClassID);
26 }
27 static bool classof(const SymbolFile *obj) { return obj->isA(&ID); }
28 /// \}
29
31 lldb::ObjectFileSP objfile, uint32_t id);
32
33 ~SymbolFileDWARFDwo() override = default;
34
36
37 void GetObjCMethods(ConstString class_name,
38 llvm::function_ref<bool(DWARFDIE die)> callback) override;
39
40 llvm::Expected<lldb::TypeSystemSP>
42
44 GetDIE(const DIERef &die_ref) override;
45
47 const lldb::offset_t data_offset,
48 const uint8_t op) const override;
49
50 uint64_t GetDebugInfoSize(bool load_all_debug_info = false) override;
51
52 bool ParseVendorDWARFOpcode(uint8_t op, const DataExtractor &opcodes,
53 lldb::offset_t &offset,
54 std::vector<Value> &stack) const override;
55
57 const CompilerDeclContext &parent_decl_ctx,
58 uint32_t max_matches,
59 VariableList &variables) override;
60
62
63 bool GetDebugInfoIndexWasLoadedFromCache() const override;
65 bool GetDebugInfoIndexWasSavedToCache() const override;
67 bool GetDebugInfoHadFrameVariableErrors() const override;
69
70protected:
71 DIEToTypePtr &GetDIEToType() override;
72
74
76
78
80
83
86 ConstString type_name,
87 bool must_be_implementation) override;
88
89 /// If this file contains exactly one compile unit, this function will return
90 /// it. Otherwise it returns nullptr.
92
94};
95} // namespace dwarf
96} // namespace lldb_private::plugin
97
98#endif // LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_SYMBOLFILEDWARFDWO_H
Represents a generic declaration context in a program.
A uniqued constant string class.
Definition: ConstString.h:40
An data extractor class.
Definition: DataExtractor.h:48
Provides public interface for all SymbolFiles.
Definition: SymbolFile.h:50
virtual bool isA(const void *ClassID) const
LLVM RTTI support.
Definition: SymbolFile.h:57
Identifies a DWARF debug info entry within a given Module.
Definition: DIERef.h:30
CompilerTypeToDIE & GetForwardDeclCompilerTypeToDIE() override
bool GetDebugInfoIndexWasLoadedFromCache() const override
Accessors for the bool that indicates if the debug info index was loaded from, or saved to the module...
UniqueDWARFASTTypeMap & GetUniqueDWARFASTTypeMap() override
uint64_t GetDebugInfoSize(bool load_all_debug_info=false) override
Metrics gathering functions.
DWARFCompileUnit * FindSingleCompileUnit()
If this file contains exactly one compile unit, this function will return it.
bool isA(const void *ClassID) const override
LLVM RTTI support.
lldb::TypeSP FindCompleteObjCDefinitionTypeForDIE(const DWARFDIE &die, ConstString type_name, bool must_be_implementation) override
static bool classof(const SymbolFile *obj)
llvm::Expected< lldb::TypeSystemSP > GetTypeSystemForLanguage(lldb::LanguageType language) override
void FindGlobalVariables(ConstString name, const CompilerDeclContext &parent_decl_ctx, uint32_t max_matches, VariableList &variables) override
lldb::TypeSP FindDefinitionTypeForDWARFDeclContext(const DWARFDIE &die) override
DIEToCompilerType & GetForwardDeclDIEToCompilerType() override
bool GetDebugInfoHadFrameVariableErrors() const override
Accessors for the bool that indicates if there was debug info, but errors stopped variables from bein...
DWARFDIE GetDIE(const DIERef &die_ref) override
DWARFCompileUnit * GetDWOCompileUnitForHash(uint64_t hash)
void GetObjCMethods(ConstString class_name, llvm::function_ref< bool(DWARFDIE die)> callback) override
bool ParseVendorDWARFOpcode(uint8_t op, const DataExtractor &opcodes, lldb::offset_t &offset, std::vector< Value > &stack) const override
lldb::offset_t GetVendorDWARFOpcodeSize(const DataExtractor &data, const lldb::offset_t data_offset, const uint8_t op) const override
llvm::DenseMap< lldb::opaque_compiler_type_t, DIERef > CompilerTypeToDIE
llvm::DenseMap< const DWARFDebugInfoEntry *, Type * > DIEToTypePtr
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb::VariableSP > DIEToVariableSP
bool isA(const void *ClassID) const override
LLVM RTTI support.
llvm::DenseMap< const DWARFDebugInfoEntry *, lldb::opaque_compiler_type_t > DIEToCompilerType
uint64_t offset_t
Definition: lldb-types.h:83
std::shared_ptr< lldb_private::ObjectFile > ObjectFileSP
Definition: lldb-forward.h:367
LanguageType
Programming language type.
std::shared_ptr< lldb_private::Type > TypeSP
Definition: lldb-forward.h:449