summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/binary-reader-objdump.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/binary-reader-objdump.cc b/src/binary-reader-objdump.cc
index 58e9cbce..5ecf7f5f 100644
--- a/src/binary-reader-objdump.cc
+++ b/src/binary-reader-objdump.cc
@@ -1253,9 +1253,15 @@ void BinaryReaderObjdump::PrintInitExpr(const InitExpr& expr) {
expr.value.v128_v.v[2], expr.value.v128_v.v[3]);
break;
}
- case InitExprType::Global:
- PrintDetails(" - init global=%" PRIindex "\n", expr.value.global);
+ case InitExprType::Global: {
+ PrintDetails(" - init global=%" PRIindex, expr.value.global);
+ string_view name = GetGlobalName(expr.value.global);
+ if (!name.empty()) {
+ PrintDetails(" <" PRIstringview ">", WABT_PRINTF_STRING_VIEW_ARG(name));
+ }
+ PrintDetails("\n");
break;
+ }
}
}