1 //===-- SymbolFileSymtab.h --------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_SymbolFileSymtab_h_
11 #define liblldb_SymbolFileSymtab_h_
16 #include "lldb/Symbol/SymbolFile.h"
17 #include "lldb/Symbol/Symtab.h"
19 class SymbolFileSymtab : public lldb_private::SymbolFile {
21 //------------------------------------------------------------------
22 // Constructors and Destructors
23 //------------------------------------------------------------------
24 SymbolFileSymtab(lldb_private::ObjectFile *obj_file);
26 ~SymbolFileSymtab() override;
28 //------------------------------------------------------------------
30 //------------------------------------------------------------------
31 static void Initialize();
33 static void Terminate();
35 static lldb_private::ConstString GetPluginNameStatic();
37 static const char *GetPluginDescriptionStatic();
39 static lldb_private::SymbolFile *
40 CreateInstance(lldb_private::ObjectFile *obj_file);
42 uint32_t CalculateAbilities() override;
44 //------------------------------------------------------------------
45 // Compile Unit function calls
46 //------------------------------------------------------------------
47 uint32_t GetNumCompileUnits() override;
49 lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
52 ParseLanguage(lldb_private::CompileUnit &comp_unit) override;
54 size_t ParseFunctions(lldb_private::CompileUnit &comp_unit) override;
56 bool ParseLineTable(lldb_private::CompileUnit &comp_unit) override;
58 bool ParseDebugMacros(lldb_private::CompileUnit &comp_unit) override;
60 bool ParseSupportFiles(lldb_private::CompileUnit &comp_unit,
61 lldb_private::FileSpecList &support_files) override;
63 size_t ParseTypes(lldb_private::CompileUnit &comp_unit) override;
65 bool ParseImportedModules(
66 const lldb_private::SymbolContext &sc,
67 std::vector<lldb_private::ConstString> &imported_modules) override;
69 size_t ParseBlocksRecursive(lldb_private::Function &func) override;
72 ParseVariablesForContext(const lldb_private::SymbolContext &sc) override;
74 lldb_private::Type *ResolveTypeUID(lldb::user_id_t type_uid) override;
75 llvm::Optional<ArrayInfo> GetDynamicArrayInfoForUID(
76 lldb::user_id_t type_uid,
77 const lldb_private::ExecutionContext *exe_ctx) override;
79 bool CompleteType(lldb_private::CompilerType &compiler_type) override;
81 uint32_t ResolveSymbolContext(const lldb_private::Address &so_addr,
82 lldb::SymbolContextItem resolve_scope,
83 lldb_private::SymbolContext &sc) override;
85 size_t GetTypes(lldb_private::SymbolContextScope *sc_scope,
86 lldb::TypeClass type_mask,
87 lldb_private::TypeList &type_list) override;
89 //------------------------------------------------------------------
90 // PluginInterface protocol
91 //------------------------------------------------------------------
92 lldb_private::ConstString GetPluginName() override;
94 uint32_t GetPluginVersion() override;
97 typedef std::map<lldb_private::ConstString, lldb::TypeSP> TypeMap;
99 lldb_private::Symtab::IndexCollection m_source_indexes;
100 lldb_private::Symtab::IndexCollection m_func_indexes;
101 lldb_private::Symtab::IndexCollection m_code_indexes;
102 lldb_private::Symtab::IndexCollection m_data_indexes;
103 lldb_private::Symtab::NameToIndexMap m_objc_class_name_to_index;
104 TypeMap m_objc_class_types;
107 DISALLOW_COPY_AND_ASSIGN(SymbolFileSymtab);
110 #endif // liblldb_SymbolFileSymtab_h_