summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/API/SBCompileUnit.cpp8
-rw-r--r--lldb/source/API/SBModule.cpp23
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp12
-rw-r--r--lldb/source/Core/SearchFilter.cpp8
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp27
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp10
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp10
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp6
-rw-r--r--lldb/source/Symbol/Block.cpp3
-rw-r--r--lldb/source/Symbol/CompileUnit.cpp35
-rw-r--r--lldb/source/Symbol/Function.cpp3
-rw-r--r--lldb/source/Symbol/SymbolVendor.cpp214
12 files changed, 63 insertions, 296 deletions
diff --git a/lldb/source/API/SBCompileUnit.cpp b/lldb/source/API/SBCompileUnit.cpp
index 341268f98c7..581bda36350 100644
--- a/lldb/source/API/SBCompileUnit.cpp
+++ b/lldb/source/API/SBCompileUnit.cpp
@@ -14,7 +14,7 @@
#include "lldb/Symbol/CompileUnit.h"
#include "lldb/Symbol/LineEntry.h"
#include "lldb/Symbol/LineTable.h"
-#include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/Type.h"
#include "lldb/Symbol/TypeList.h"
@@ -138,13 +138,13 @@ lldb::SBTypeList SBCompileUnit::GetTypes(uint32_t type_mask) {
if (!module_sp)
return LLDB_RECORD_RESULT(sb_type_list);
- SymbolVendor *vendor = module_sp->GetSymbolVendor();
- if (!vendor)
+ SymbolFile *symfile = module_sp->GetSymbolFile();
+ if (!symfile)
return LLDB_RECORD_RESULT(sb_type_list);
TypeClass type_class = static_cast<TypeClass>(type_mask);
TypeList type_list;
- vendor->GetTypes(m_opaque_ptr, type_class, type_list);
+ symfile->GetTypes(m_opaque_ptr, type_class, type_list);
sb_type_list.m_opaque_up->Append(type_list);
return LLDB_RECORD_RESULT(sb_type_list);
}
diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp
index 6f856de53a1..253a5393486 100644
--- a/lldb/source/API/SBModule.cpp
+++ b/lldb/source/API/SBModule.cpp
@@ -20,7 +20,6 @@
#include "lldb/Core/ValueObjectVariable.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SymbolFile.h"
-#include "lldb/Symbol/SymbolVendor.h"
#include "lldb/Symbol/Symtab.h"
#include "lldb/Symbol/TypeSystem.h"
#include "lldb/Symbol/VariableList.h"
@@ -366,7 +365,7 @@ size_t SBModule::GetNumSections() {
ModuleSP module_sp(GetSP());
if (module_sp) {
// Give the symbol vendor a chance to add to the unified section list.
- module_sp->GetSymbolVendor();
+ module_sp->GetSymbolFile();
SectionList *section_list = module_sp->GetSectionList();
if (section_list)
return section_list->GetSize();
@@ -382,7 +381,7 @@ SBSection SBModule::GetSectionAtIndex(size_t idx) {
ModuleSP module_sp(GetSP());
if (module_sp) {
// Give the symbol vendor a chance to add to the unified section list.
- module_sp->GetSymbolVendor();
+ module_sp->GetSymbolFile();
SectionList *section_list = module_sp->GetSectionList();
if (section_list)
@@ -536,9 +535,8 @@ lldb::SBType SBModule::GetTypeByID(lldb::user_id_t uid) {
ModuleSP module_sp(GetSP());
if (module_sp) {
- SymbolVendor *vendor = module_sp->GetSymbolVendor();
- if (vendor) {
- Type *type_ptr = vendor->ResolveTypeUID(uid);
+ if (SymbolFile *symfile = module_sp->GetSymbolFile()) {
+ Type *type_ptr = symfile->ResolveTypeUID(uid);
if (type_ptr)
return LLDB_RECORD_RESULT(SBType(type_ptr->shared_from_this()));
}
@@ -555,13 +553,13 @@ lldb::SBTypeList SBModule::GetTypes(uint32_t type_mask) {
ModuleSP module_sp(GetSP());
if (!module_sp)
return LLDB_RECORD_RESULT(sb_type_list);
- SymbolVendor *vendor = module_sp->GetSymbolVendor();
- if (!vendor)
+ SymbolFile *symfile = module_sp->GetSymbolFile();
+ if (!symfile)
return LLDB_RECORD_RESULT(sb_type_list);
TypeClass type_class = static_cast<TypeClass>(type_mask);
TypeList type_list;
- vendor->GetTypes(nullptr, type_class, type_list);
+ symfile->GetTypes(nullptr, type_class, type_list);
sb_type_list.m_opaque_up->Append(type_list);
return LLDB_RECORD_RESULT(sb_type_list);
}
@@ -575,7 +573,7 @@ SBSection SBModule::FindSection(const char *sect_name) {
ModuleSP module_sp(GetSP());
if (sect_name && module_sp) {
// Give the symbol vendor a chance to add to the unified section list.
- module_sp->GetSymbolVendor();
+ module_sp->GetSymbolFile();
SectionList *section_list = module_sp->GetSectionList();
if (section_list) {
ConstString const_sect_name(sect_name);
@@ -657,9 +655,8 @@ lldb::SBFileSpec SBModule::GetSymbolFileSpec() const {
lldb::SBFileSpec sb_file_spec;
ModuleSP module_sp(GetSP());
if (module_sp) {
- SymbolVendor *symbol_vendor_ptr = module_sp->GetSymbolVendor();
- if (symbol_vendor_ptr)
- sb_file_spec.SetFileSpec(symbol_vendor_ptr->GetMainFileSpec());
+ if (SymbolFile *symfile = module_sp->GetSymbolFile())
+ sb_file_spec.SetFileSpec(symfile->GetObjectFile()->GetFileSpec());
}
return LLDB_RECORD_RESULT(sb_file_spec);
}
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 5535a50f0c8..52a77314e8f 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -37,7 +37,6 @@
#include "lldb/Symbol/LocateSymbolFile.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Symbol/SymbolFile.h"
-#include "lldb/Symbol/SymbolVendor.h"
#include "lldb/Symbol/UnwindPlan.h"
#include "lldb/Symbol/VariableList.h"
#include "lldb/Target/ABI.h"
@@ -1471,11 +1470,10 @@ static void DumpModuleSections(CommandInterpreter &interpreter, Stream &strm,
}
}
-static bool DumpModuleSymbolVendor(Stream &strm, Module *module) {
+static bool DumpModuleSymbolFile(Stream &strm, Module *module) {
if (module) {
- SymbolVendor *symbol_vendor = module->GetSymbolVendor(true);
- if (symbol_vendor) {
- symbol_vendor->Dump(&strm);
+ if (SymbolFile *symbol_file = module->GetSymbolFile(true)) {
+ symbol_file->Dump(strm);
return true;
}
}
@@ -2330,7 +2328,7 @@ protected:
for (uint32_t image_idx = 0; image_idx < num_modules; ++image_idx) {
if (m_interpreter.WasInterrupted())
break;
- if (DumpModuleSymbolVendor(
+ if (DumpModuleSymbolFile(
result.GetOutputStream(),
target_modules.GetModulePointerAtIndexUnlocked(image_idx)))
num_dumped++;
@@ -2355,7 +2353,7 @@ protected:
break;
Module *module = module_list.GetModulePointerAtIndex(i);
if (module) {
- if (DumpModuleSymbolVendor(result.GetOutputStream(), module))
+ if (DumpModuleSymbolFile(result.GetOutputStream(), module))
num_dumped++;
}
}
diff --git a/lldb/source/Core/SearchFilter.cpp b/lldb/source/Core/SearchFilter.cpp
index c9a6766402f..22c8997ed46 100644
--- a/lldb/source/Core/SearchFilter.cpp
+++ b/lldb/source/Core/SearchFilter.cpp
@@ -13,7 +13,7 @@
#include "lldb/Core/ModuleList.h"
#include "lldb/Symbol/CompileUnit.h"
#include "lldb/Symbol/SymbolContext.h"
-#include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/ConstString.h"
#include "lldb/Utility/Status.h"
@@ -316,10 +316,10 @@ SearchFilter::DoCUIteration(const ModuleSP &module_sp,
// First make sure this compile unit's functions are parsed
// since CompUnit::ForeachFunction only iterates over already
// parsed functions.
- SymbolVendor *sym_vendor = module_sp->GetSymbolVendor();
- if (!sym_vendor)
+ SymbolFile *sym_file = module_sp->GetSymbolFile();
+ if (!sym_file)
continue;
- if (!sym_vendor->ParseFunctions(*cu_sp))
+ if (!sym_file->ParseFunctions(*cu_sp))
continue;
// If we got any functions, use ForeachFunction to do the iteration.
cu_sp->ForeachFunction([&](const FunctionSP &func_sp) {
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
index 53e9c2cca22..3841b594d15 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp
@@ -18,7 +18,6 @@
#include "lldb/Symbol/CompilerDeclContext.h"
#include "lldb/Symbol/Function.h"
#include "lldb/Symbol/SymbolFile.h"
-#include "lldb/Symbol/SymbolVendor.h"
#include "lldb/Symbol/TaggedASTType.h"
#include "lldb/Target/Target.h"
#include "lldb/Utility/Log.h"
@@ -815,11 +814,8 @@ void ClangASTSource::FindExternalVisibleDecls(
if (module_sp && namespace_decl) {
CompilerDeclContext found_namespace_decl;
- SymbolVendor *symbol_vendor = module_sp->GetSymbolVendor();
-
- if (symbol_vendor) {
- found_namespace_decl =
- symbol_vendor->FindNamespace(name, &namespace_decl);
+ if (SymbolFile *symbol_file = module_sp->GetSymbolFile()) {
+ found_namespace_decl = symbol_file->FindNamespace(name, &namespace_decl);
if (found_namespace_decl) {
context.m_namespace_map->push_back(
@@ -843,13 +839,12 @@ void ClangASTSource::FindExternalVisibleDecls(
CompilerDeclContext found_namespace_decl;
- SymbolVendor *symbol_vendor = image->GetSymbolVendor();
+ SymbolFile *symbol_file = image->GetSymbolFile();
- if (!symbol_vendor)
+ if (!symbol_file)
continue;
- found_namespace_decl =
- symbol_vendor->FindNamespace(name, &namespace_decl);
+ found_namespace_decl = symbol_file->FindNamespace(name, &namespace_decl);
if (found_namespace_decl) {
context.m_namespace_map->push_back(
@@ -1885,13 +1880,13 @@ void ClangASTSource::CompleteNamespaceMap(
lldb::ModuleSP module_sp = i->first;
CompilerDeclContext module_parent_namespace_decl = i->second;
- SymbolVendor *symbol_vendor = module_sp->GetSymbolVendor();
+ SymbolFile *symbol_file = module_sp->GetSymbolFile();
- if (!symbol_vendor)
+ if (!symbol_file)
continue;
found_namespace_decl =
- symbol_vendor->FindNamespace(name, &module_parent_namespace_decl);
+ symbol_file->FindNamespace(name, &module_parent_namespace_decl);
if (!found_namespace_decl)
continue;
@@ -1917,13 +1912,13 @@ void ClangASTSource::CompleteNamespaceMap(
CompilerDeclContext found_namespace_decl;
- SymbolVendor *symbol_vendor = image->GetSymbolVendor();
+ SymbolFile *symbol_file = image->GetSymbolFile();
- if (!symbol_vendor)
+ if (!symbol_file)
continue;
found_namespace_decl =
- symbol_vendor->FindNamespace(name, &null_namespace_decl);
+ symbol_file->FindNamespace(name, &null_namespace_decl);
if (!found_namespace_decl)
continue;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
index 52f855b639f..8a4e40dcd0a 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -28,7 +28,7 @@
#include "lldb/Symbol/CompileUnit.h"
#include "lldb/Symbol/Function.h"
#include "lldb/Symbol/ObjectFile.h"
-#include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/TypeList.h"
#include "lldb/Symbol/TypeMap.h"
#include "lldb/Target/Language.h"
@@ -148,8 +148,8 @@ TypeSP DWARFASTParserClang::ParseTypeFromDWO(const DWARFDIE &die, Log *log) {
die.GetDeclContext(decl_context);
TypeMap dwo_types;
- if (!dwo_module_sp->GetSymbolVendor()->FindTypes(decl_context, true,
- dwo_types)) {
+ if (!dwo_module_sp->GetSymbolFile()->FindTypes(decl_context, true,
+ dwo_types)) {
if (!IsClangModuleFwdDecl(die))
return TypeSP();
@@ -159,8 +159,8 @@ TypeSP DWARFASTParserClang::ParseTypeFromDWO(const DWARFDIE &die, Log *log) {
for (const auto &name_module : sym_file.getExternalTypeModules()) {
if (!name_module.second)
continue;
- SymbolVendor *sym_vendor = name_module.second->GetSymbolVendor();
- if (sym_vendor->FindTypes(decl_context, true, dwo_types))
+ if (name_module.second->GetSymbolFile()->FindTypes(decl_context, true,
+ dwo_types))
break;
}
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 11e3fcc8043..765982e70fa 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -43,7 +43,7 @@
#include "lldb/Symbol/LineTable.h"
#include "lldb/Symbol/LocateSymbolFile.h"
#include "lldb/Symbol/ObjectFile.h"
-#include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/TypeMap.h"
#include "lldb/Symbol/TypeSystem.h"
#include "lldb/Symbol/VariableList.h"
@@ -2438,11 +2438,11 @@ uint32_t SymbolFileDWARF::FindTypes(
for (const auto &pair : m_external_type_modules) {
ModuleSP external_module_sp = pair.second;
if (external_module_sp) {
- SymbolVendor *sym_vendor = external_module_sp->GetSymbolVendor();
- if (sym_vendor) {
+ SymbolFile *sym_file = external_module_sp->GetSymbolFile();
+ if (sym_file) {
const uint32_t num_external_matches =
- sym_vendor->FindTypes(name, parent_decl_ctx, append, max_matches,
- searched_symbol_files, types);
+ sym_file->FindTypes(name, parent_decl_ctx, append, max_matches,
+ searched_symbol_files, types);
if (num_external_matches)
return num_external_matches;
}
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
index 66303e4399b..af04d05e83b 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -776,7 +776,7 @@ SymbolFileDWARFDebugMap::ResolveSymbolContext(const Address &exe_so_addr,
Address oso_so_addr;
if (oso_module->ResolveFileAddress(oso_file_addr, oso_so_addr)) {
resolved_flags |=
- oso_module->GetSymbolVendor()->ResolveSymbolContext(
+ oso_module->GetSymbolFile()->ResolveSymbolContext(
oso_so_addr, resolve_scope, sc);
}
}
@@ -1405,8 +1405,8 @@ bool SymbolFileDWARFDebugMap::LinkOSOAddress(Address &addr) {
if (addr_module == exe_module)
return true; // Address is already in terms of the main executable module
- CompileUnitInfo *cu_info = GetCompileUnitInfo(GetSymbolFileAsSymbolFileDWARF(
- addr_module->GetSymbolVendor()->GetSymbolFile()));
+ CompileUnitInfo *cu_info = GetCompileUnitInfo(
+ GetSymbolFileAsSymbolFileDWARF(addr_module->GetSymbolFile()));
if (cu_info) {
const lldb::addr_t oso_file_addr = addr.GetFileAddress();
const FileRangeMap::Entry *oso_range_entry =
diff --git a/lldb/source/Symbol/Block.cpp b/lldb/source/Symbol/Block.cpp
index e9044145884..77a4830dea7 100644
--- a/lldb/source/Symbol/Block.cpp
+++ b/lldb/source/Symbol/Block.cpp
@@ -12,7 +12,6 @@
#include "lldb/Core/Section.h"
#include "lldb/Symbol/Function.h"
#include "lldb/Symbol/SymbolFile.h"
-#include "lldb/Symbol/SymbolVendor.h"
#include "lldb/Symbol/VariableList.h"
#include "lldb/Utility/Log.h"
@@ -393,7 +392,7 @@ VariableListSP Block::GetBlockVariableList(bool can_create) {
SymbolContext sc;
CalculateSymbolContext(&sc);
assert(sc.module_sp);
- sc.module_sp->GetSymbolVendor()->ParseVariablesForContext(sc);
+ sc.module_sp->GetSymbolFile()->ParseVariablesForContext(sc);
}
}
return m_variable_list_sp;
diff --git a/lldb/source/Symbol/CompileUnit.cpp b/lldb/source/Symbol/CompileUnit.cpp
index 5fb9b6b9f72..6ed2799cb81 100644
--- a/lldb/source/Symbol/CompileUnit.cpp
+++ b/lldb/source/Symbol/CompileUnit.cpp
@@ -9,7 +9,7 @@
#include "lldb/Symbol/CompileUnit.h"
#include "lldb/Core/Module.h"
#include "lldb/Symbol/LineTable.h"
-#include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/VariableList.h"
#include "lldb/Target/Language.h"
@@ -173,10 +173,8 @@ lldb::LanguageType CompileUnit::GetLanguage() {
if (m_language == eLanguageTypeUnknown) {
if (m_flags.IsClear(flagsParsedLanguage)) {
m_flags.Set(flagsParsedLanguage);
- SymbolVendor *symbol_vendor = GetModule()->GetSymbolVendor();
- if (symbol_vendor) {
- m_language = symbol_vendor->ParseLanguage(*this);
- }
+ if (SymbolFile *symfile = GetModule()->GetSymbolFile())
+ m_language = symfile->ParseLanguage(*this);
}
}
return m_language;
@@ -186,9 +184,8 @@ LineTable *CompileUnit::GetLineTable() {
if (m_line_table_up == nullptr) {
if (m_flags.IsClear(flagsParsedLineTable)) {
m_flags.Set(flagsParsedLineTable);
- SymbolVendor *symbol_vendor = GetModule()->GetSymbolVendor();
- if (symbol_vendor)
- symbol_vendor->ParseLineTable(*this);
+ if (SymbolFile *symfile = GetModule()->GetSymbolFile())
+ symfile->ParseLineTable(*this);
}
}
return m_line_table_up.get();
@@ -206,10 +203,8 @@ DebugMacros *CompileUnit::GetDebugMacros() {
if (m_debug_macros_sp.get() == nullptr) {
if (m_flags.IsClear(flagsParsedDebugMacros)) {
m_flags.Set(flagsParsedDebugMacros);
- SymbolVendor *symbol_vendor = GetModule()->GetSymbolVendor();
- if (symbol_vendor) {
- symbol_vendor->ParseDebugMacros(*this);
- }
+ if (SymbolFile *symfile = GetModule()->GetSymbolFile())
+ symfile->ParseDebugMacros(*this);
}
}
@@ -229,7 +224,7 @@ VariableListSP CompileUnit::GetVariableList(bool can_create) {
SymbolContext sc;
CalculateSymbolContext(&sc);
assert(sc.module_sp);
- sc.module_sp->GetSymbolVendor()->ParseVariablesForContext(sc);
+ sc.module_sp->GetSymbolFile()->ParseVariablesForContext(sc);
}
return m_variables;
@@ -372,8 +367,8 @@ uint32_t CompileUnit::ResolveSymbolContext(const FileSpec &file_spec,
bool CompileUnit::GetIsOptimized() {
if (m_is_optimized == eLazyBoolCalculate) {
m_is_optimized = eLazyBoolNo;
- if (SymbolVendor *symbol_vendor = GetModule()->GetSymbolVendor()) {
- if (symbol_vendor->ParseIsOptimized(*this))
+ if (SymbolFile *symfile = GetModule()->GetSymbolFile()) {
+ if (symfile->ParseIsOptimized(*this))
m_is_optimized = eLazyBoolYes;
}
}
@@ -388,10 +383,10 @@ const std::vector<SourceModule> &CompileUnit::GetImportedModules() {
if (m_imported_modules.empty() &&
m_flags.IsClear(flagsParsedImportedModules)) {
m_flags.Set(flagsParsedImportedModules);
- if (SymbolVendor *symbol_vendor = GetModule()->GetSymbolVendor()) {
+ if (SymbolFile *symfile = GetModule()->GetSymbolFile()) {
SymbolContext sc;
CalculateSymbolContext(&sc);
- symbol_vendor->ParseImportedModules(sc, m_imported_modules);
+ symfile->ParseImportedModules(sc, m_imported_modules);
}
}
return m_imported_modules;
@@ -401,10 +396,8 @@ const FileSpecList &CompileUnit::GetSupportFiles() {
if (m_support_files.GetSize() == 0) {
if (m_flags.IsClear(flagsParsedSupportFiles)) {
m_flags.Set(flagsParsedSupportFiles);
- SymbolVendor *symbol_vendor = GetModule()->GetSymbolVendor();
- if (symbol_vendor) {
- symbol_vendor->ParseSupportFiles(*this, m_support_files);
- }
+ if (SymbolFile *symfile = GetModule()->GetSymbolFile())
+ symfile->ParseSupportFiles(*this, m_support_files);
}
}
return m_support_files;
diff --git a/lldb/source/Symbol/Function.cpp b/lldb/source/Symbol/Function.cpp
index 49b2c9b268e..28ce4fdd4ad 100644
--- a/lldb/source/Symbol/Function.cpp
+++ b/lldb/source/Symbol/Function.cpp
@@ -16,7 +16,6 @@
#include "lldb/Symbol/CompilerType.h"
#include "lldb/Symbol/LineTable.h"
#include "lldb/Symbol/SymbolFile.h"
-#include "lldb/Symbol/SymbolVendor.h"
#include "lldb/Target/Language.h"
#include "lldb/Utility/Log.h"
#include "llvm/Support/Casting.h"
@@ -281,7 +280,7 @@ Block &Function::GetBlock(bool can_create) {
if (!m_block.BlockInfoHasBeenParsed() && can_create) {
ModuleSP module_sp = CalculateSymbolContextModule();
if (module_sp) {
- module_sp->GetSymbolVendor()->ParseBlocksRecursive(*this);
+ module_sp->GetSymbolFile()->ParseBlocksRecursive(*this);
} else {
Host::SystemLog(Host::eSystemLogError,
"error: unable to find module "
diff --git a/lldb/source/Symbol/SymbolVendor.cpp b/lldb/source/Symbol/SymbolVendor.cpp
index 929cb3eb648..1e1dea71d7f 100644
--- a/lldb/source/Symbol/SymbolVendor.cpp
+++ b/lldb/source/Symbol/SymbolVendor.cpp
@@ -73,220 +73,6 @@ void SymbolVendor::AddSymbolFileRepresentation(const ObjectFileSP &objfile_sp) {
}
}
-size_t SymbolVendor::GetNumCompileUnits() {
- if (m_sym_file_up)
- return m_sym_file_up->GetNumCompileUnits();
- return 0;
-}
-
-lldb::LanguageType SymbolVendor::ParseLanguage(CompileUnit &comp_unit) {
- if (m_sym_file_up)
- return m_sym_file_up->ParseLanguage(comp_unit);
- return eLanguageTypeUnknown;
-}
-
-size_t SymbolVendor::ParseFunctions(CompileUnit &comp_unit) {
- if (m_sym_file_up)
- return m_sym_file_up->ParseFunctions(comp_unit);
- return 0;
-}
-
-bool SymbolVendor::ParseLineTable(CompileUnit &comp_unit) {
- if (m_sym_file_up)
- return m_sym_file_up->ParseLineTable(comp_unit);
- return false;
-}
-
-bool SymbolVendor::ParseDebugMacros(CompileUnit &comp_unit) {
- if (m_sym_file_up)
- return m_sym_file_up->ParseDebugMacros(comp_unit);
- return false;
-}
-bool SymbolVendor::ParseSupportFiles(CompileUnit &comp_unit,
- FileSpecList &support_files) {
- if (m_sym_file_up)
- return m_sym_file_up->ParseSupportFiles(comp_unit, support_files);
- return false;
-}
-
-bool SymbolVendor::ParseIsOptimized(CompileUnit &comp_unit) {
- if (m_sym_file_up)
- return m_sym_file_up->ParseIsOptimized(comp_unit);
- return false;
-}
-
-bool SymbolVendor::ParseImportedModules(
- const SymbolContext &sc, std::vector<SourceModule> &imported_modules) {
- if (m_sym_file_up)
- return m_sym_file_up->ParseImportedModules(sc, imported_modules);
- return false;
-}
-
-size_t SymbolVendor::ParseBlocksRecursive(Function &func) {
- if (m_sym_file_up)
- return m_sym_file_up->ParseBlocksRecursive(func);
- return 0;
-}
-
-size_t SymbolVendor::ParseTypes(CompileUnit &comp_unit) {
- if (m_sym_file_up)
- return m_sym_file_up->ParseTypes(comp_unit);
- return 0;
-}
-
-size_t SymbolVendor::ParseVariablesForContext(const SymbolContext &sc) {
- if (m_sym_file_up)
- return m_sym_file_up->ParseVariablesForContext(sc);
- return 0;
-}
-
-Type *SymbolVendor::ResolveTypeUID(lldb::user_id_t type_uid) {
- if (m_sym_file_up)
- return m_sym_file_up->ResolveTypeUID(type_uid);
- return nullptr;
-}
-
-uint32_t SymbolVendor::ResolveSymbolContext(const Address &so_addr,
- SymbolContextItem resolve_scope,
- SymbolContext &sc) {
- if (m_sym_file_up)
- return m_sym_file_up->ResolveSymbolContext(so_addr, resolve_scope, sc);
- return 0;
-}
-
-uint32_t SymbolVendor::ResolveSymbolContext(const FileSpec &file_spec,
- uint32_t line, bool check_inlines,
- SymbolContextItem resolve_scope,
- SymbolContextList &sc_list) {
- if (m_sym_file_up)
- return m_sym_file_up->ResolveSymbolContext(file_spec, line, check_inlines,
- resolve_scope, sc_list);
- return 0;
-}
-
-size_t
-SymbolVendor::FindGlobalVariables(ConstString name,
- const CompilerDeclContext *parent_decl_ctx,
- size_t max_matches, VariableList &variables) {
- if (m_sym_file_up)
- return m_sym_file_up->FindGlobalVariables(name, parent_decl_ctx,
- max_matches, variables);
- return 0;
-}
-
-size_t SymbolVendor::FindGlobalVariables(const RegularExpression &regex,
- size_t max_matches,
- VariableList &variables) {
- if (m_sym_file_up)
- return m_sym_file_up->FindGlobalVariables(regex, max_matches, variables);
- return 0;
-}
-
-size_t SymbolVendor::FindFunctions(ConstString name,
- const CompilerDeclContext *parent_decl_ctx,
- FunctionNameType name_type_mask,
- bool include_inlines, bool append,
- SymbolContextList &sc_list) {
- if (m_sym_file_up)
- return m_sym_file_up->FindFunctions(name, parent_decl_ctx, name_type_mask,
- include_inlines, append, sc_list);
- return 0;
-}
-
-size_t SymbolVendor::FindFunctions(const RegularExpression &regex,
- bool include_inlines, bool append,
- SymbolContextList &sc_list) {
- if (m_sym_file_up)
- return m_sym_file_up->FindFunctions(regex, include_inlines, append,
- sc_list);
- return 0;
-}
-
-size_t SymbolVendor::FindTypes(
- ConstString name, const CompilerDeclContext *parent_decl_ctx,
- bool append, size_t max_matches,
- llvm::DenseSet<lldb_private::SymbolFile *> &searched_symbol_files,
- TypeMap &types) {
- if (m_sym_file_up)
- return m_sym_file_up->FindTypes(name, parent_decl_ctx, append, max_matches,
- searched_symbol_files, types);
- if (!append)
- types.Clear();
- return 0;
-}
-
-size_t SymbolVendor::FindTypes(const std::vector<CompilerContext> &context,
- bool append, TypeMap &types) {
- if (m_sym_file_up)
- return m_sym_file_up->FindTypes(context, append, types);
- if (!append)
- types.Clear();
- return 0;
-}
-
-size_t SymbolVendor::GetTypes(SymbolContextScope *sc_scope, TypeClass type_mask,
- lldb_private::TypeList &type_list) {
- if (m_sym_file_up)
- return m_sym_file_up->GetTypes(sc_scope, type_mask, type_list);
- return 0;
-}
-
-CompilerDeclContext
-SymbolVendor::FindNamespace(ConstString name,
- const CompilerDeclContext *parent_decl_ctx) {
- CompilerDeclContext namespace_decl_ctx;
- if (m_sym_file_up)
- namespace_decl_ctx = m_sym_file_up->FindNamespace(name, parent_decl_ctx);
- return namespace_decl_ctx;
-}
-
-void SymbolVendor::Dump(Stream *s) {
- ModuleSP module_sp(GetModule());
- if (module_sp) {
- std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
-
- s->Printf("%p: ", static_cast<void *>(this));
- s->Indent();
- s->PutCString("SymbolVendor");
- if (m_sym_file_up) {
- *s << " " << m_sym_file_up->GetPluginName();
- ObjectFile *objfile = m_sym_file_up->GetObjectFile();
- if (objfile) {
- const FileSpec &objfile_file_spec = objfile->GetFileSpec();
- if (objfile_file_spec) {
- s->PutCString(" (");
- objfile_file_spec.Dump(s);
- s->PutChar(')');
- }
- }
- }
- s->EOL();
- if (m_sym_file_up)
- m_sym_file_up->Dump(*s);
- }
-}
-
-CompUnitSP SymbolVendor::GetCompileUnitAtIndex(size_t idx) {
- if (m_sym_file_up)
- return m_sym_file_up->GetCompileUnitAtIndex(idx);
- return nullptr;
-}
-
-FileSpec SymbolVendor::GetMainFileSpec() const {
- if (m_sym_file_up) {
- const ObjectFile *symfile_objfile = m_sym_file_up->GetObjectFile();
- if (symfile_objfile)
- return symfile_objfile->GetFileSpec();
- }
-
- return FileSpec();
-}
-
-void SymbolVendor::SectionFileAddressesChanged() {
- if (m_sym_file_up)
- m_sym_file_up->SectionFileAddressesChanged();
-}
-
// PluginInterface protocol
lldb_private::ConstString SymbolVendor::GetPluginName() {
static ConstString g_name("vendor-default");
OpenPOWER on IntegriCloud