Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/binary-reader-objdump.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,10 @@ Result BinaryReaderObjdump::OnGlobalCount(Index count) {
Result BinaryReaderObjdump::BeginGlobal(Index index, Type type, bool mutable_) {
PrintDetails(" - global[%" PRIindex "] %s mutable=%d", index,
GetTypeName(type), mutable_);
string_view name = GetGlobalName(index);
if (!name.empty()) {
PrintDetails(" <" PRIstringview ">", WABT_PRINTF_STRING_VIEW_ARG(name));
}
return Result::Ok;
}

Expand Down
2 changes: 1 addition & 1 deletion test/dump/mutable-global.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Section Details:
Import[1]:
- global[0] i32 mutable=1 <- foo.imported
Global[1]:
- global[1] i32 mutable=1 - init i32=1
- global[1] i32 mutable=1 <exported> - init i32=1
Export[1]:
- global[1] -> "exported"

Expand Down