Go to the documentation of this file.
36 void SymbolVendorWasm::Initialize() {
37 PluginManager::RegisterPlugin(GetPluginNameStatic(),
38 GetPluginDescriptionStatic(), CreateInstance);
41 void SymbolVendorWasm::Terminate() {
42 PluginManager::UnregisterPlugin(CreateInstance);
45 llvm::StringRef SymbolVendorWasm::GetPluginDescriptionStatic() {
46 return "Symbol vendor for WASM that looks for dwo files that match "
56 SymbolVendorWasm::CreateInstance(
const lldb::ModuleSP &module_sp,
62 llvm::dyn_cast_or_null<ObjectFileWasm>(module_sp->GetObjectFile());
72 module_sp->GetFileSpec().GetPath().c_str());
76 FileSystem::Instance().Resolve(module_spec.
GetFileSpec());
82 std::optional<FileSpec> symbol_file_spec =
84 if (!symbol_file_spec)
88 FileSpecList search_paths = Target::GetDefaultDebugFileSearchPaths();
90 Symbols::LocateExecutableSymbolFile(module_spec, search_paths);
94 DataBufferSP sym_file_data_sp;
96 ObjectFileSP sym_objfile_sp = ObjectFile::FindPlugin(
97 module_sp, &sym_fspec, 0, FileSystem::Instance().GetByteSize(sym_fspec),
98 sym_file_data_sp, sym_file_data_offset);
103 sym_objfile_sp->SetType(ObjectFile::eTypeDebugInfo);
109 SectionList *module_section_list = module_sp->GetSectionList();
110 SectionList *objfile_section_list = sym_objfile_sp->GetSectionList();
124 if (SectionSP section_sp =
126 if (SectionSP module_section_sp =
136 return symbol_vendor;
std::optional< FileSpec > GetExternalDebugInfoFileSpec()
A Wasm module that has external DWARF debug information should contain a custom section named "extern...
bool ReplaceSection(lldb::user_id_t sect_id, const lldb::SectionSP §ion_sp, uint32_t depth=UINT32_MAX)
@ eSectionTypeDWARFDebugLoc
#define LLDB_SCOPED_TIMERF(...)
virtual FileSpec & GetFileSpec()
Get accessor to the object file specification.
void AddSymbolFileRepresentation(const lldb::ObjectFileSP &objfile_sp)
UUID GetUUID() override
Gets the UUID for this object file.
@ eSectionTypeDWARFDebugAranges
@ eSectionTypeDWARFDebugRanges
@ eSectionTypeDWARFDebugMacro
@ eSectionTypeDWARFDebugFrame
@ eSectionTypeDWARFDebugLine
@ eSectionTypeDWARFDebugAddr
@ eSectionTypeDWARFDebugStrOffsets
Generic Wasm object file reader.
FileSpec & GetSymbolFileSpec()
size_t AddSection(const lldb::SectionSP §ion_sp)
virtual SectionList * GetSectionList(bool update_module_section_list=true)
Gets the section list for the currently selected architecture (and object for archives).
@ eSectionTypeDWARFDebugAbbrev
@ eSectionTypeDWARFDebugStr
@ eSectionTypeDWARFDebugInfo
@ eSectionTypeDWARFDebugTypes
DWARF .debug_types section.
@ eSectionTypeDWARFDebugCuIndex
lldb::SectionSP FindSectionByType(lldb::SectionType sect_type, bool check_children, size_t start_idx=0) const
@ eSectionTypeDWARFDebugPubTypes
@ eSectionTypeDWARFDebugPubNames
@ eSectionTypeDWARFDebugLineStr
DWARF v5 .debug_line_str.
A class that represents a running process on the host machine.
#define LLDB_PLUGIN_DEFINE(PluginName)
@ eSectionTypeDWARFDebugMacInfo
@ eSectionTypeDWARFDebugLocLists
DWARF v5 .debug_loclists.
@ eSectionTypeDWARFDebugRngLists
DWARF v5 .debug_rnglists.