MCPcopy Create free account
hub / github.com/WebAssembly/wabt / GetSymbolName

Method GetSymbolName

src/binary-reader-objdump.cc:180–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180std::string_view BinaryReaderObjdumpBase::GetSymbolName(
181 Index symbol_index) const {
182 if (symbol_index >= objdump_state_->symtab.size())
183 return "<illegal_symbol_index>";
184 ObjdumpSymbol& sym = objdump_state_->symtab[symbol_index];
185 switch (sym.kind) {
186 case SymbolType::Function:
187 return GetFunctionName(sym.index);
188 case SymbolType::Data:
189 return sym.name;
190 case SymbolType::Global:
191 return GetGlobalName(sym.index);
192 case SymbolType::Section:
193 return GetSectionName(sym.index);
194 case SymbolType::Tag:
195 return GetTagName(sym.index);
196 case SymbolType::Table:
197 return GetTableName(sym.index);
198 }
199 WABT_UNREACHABLE;
200}
201
202void BinaryReaderObjdumpBase::PrintRelocation(const Reloc& reloc,
203 Offset offset) const {

Callers

nothing calls this directly

Calls 2

GetSectionNameFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected