summaryrefslogtreecommitdiff
path: root/src/binary-reader-objdump.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/binary-reader-objdump.cc')
-rw-r--r--src/binary-reader-objdump.cc20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/binary-reader-objdump.cc b/src/binary-reader-objdump.cc
index ff9afbc6..52e6d27a 100644
--- a/src/binary-reader-objdump.cc
+++ b/src/binary-reader-objdump.cc
@@ -1059,7 +1059,8 @@ class BinaryReaderObjdump : public BinaryReaderObjdumpBase {
std::string_view module_name,
std::string_view field_name,
Index memory_index,
- const Limits* page_limits) override;
+ const Limits* page_limits,
+ uint32_t page_size) override;
Result OnImportGlobal(Index import_index,
std::string_view module_name,
std::string_view field_name,
@@ -1081,7 +1082,9 @@ class BinaryReaderObjdump : public BinaryReaderObjdumpBase {
const Limits* elem_limits) override;
Result OnMemoryCount(Index count) override;
- Result OnMemory(Index index, const Limits* limits) override;
+ Result OnMemory(Index index,
+ const Limits* limits,
+ uint32_t page_size) override;
Result OnGlobalCount(Index count) override;
Result BeginGlobal(Index index, Type type, bool mutable_) override;
@@ -1563,7 +1566,8 @@ Result BinaryReaderObjdump::OnImportMemory(Index import_index,
std::string_view module_name,
std::string_view field_name,
Index memory_index,
- const Limits* page_limits) {
+ const Limits* page_limits,
+ uint32_t page_size) {
PrintDetails(" - memory[%" PRIindex "] pages: initial=%" PRId64, memory_index,
page_limits->initial);
if (page_limits->has_max) {
@@ -1575,6 +1579,9 @@ Result BinaryReaderObjdump::OnImportMemory(Index import_index,
if (page_limits->is_64) {
PrintDetails(" i64");
}
+ if (page_size != WABT_DEFAULT_PAGE_SIZE) {
+ PrintDetails(" (pagesize %u)", page_size);
+ }
PrintDetails(" <- " PRIstringview "." PRIstringview "\n",
WABT_PRINTF_STRING_VIEW_ARG(module_name),
WABT_PRINTF_STRING_VIEW_ARG(field_name));
@@ -1615,7 +1622,9 @@ Result BinaryReaderObjdump::OnMemoryCount(Index count) {
return OnCount(count);
}
-Result BinaryReaderObjdump::OnMemory(Index index, const Limits* page_limits) {
+Result BinaryReaderObjdump::OnMemory(Index index,
+ const Limits* page_limits,
+ uint32_t page_size) {
PrintDetails(" - memory[%" PRIindex "] pages: initial=%" PRId64, index,
page_limits->initial);
if (page_limits->has_max) {
@@ -1627,6 +1636,9 @@ Result BinaryReaderObjdump::OnMemory(Index index, const Limits* page_limits) {
if (page_limits->is_64) {
PrintDetails(" i64");
}
+ if (page_size != WABT_DEFAULT_PAGE_SIZE) {
+ PrintDetails(" (pagesize %u)", page_size);
+ }
PrintDetails("\n");
return Result::Ok;
}