summaryrefslogtreecommitdiff
path: root/src/binary-reader-objdump.cc
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2017-05-08 17:56:23 -0700
committerGitHub <noreply@github.com>2017-05-08 17:56:23 -0700
commit47407e7f11a7cc4568b2901bf2dd36b8ebf91cec (patch)
tree6e652232264b5da42992faddf3508d3199ce3de9 /src/binary-reader-objdump.cc
parentea9cd441420da1d129271a669872bc444c35ad2f (diff)
downloadwabt-47407e7f11a7cc4568b2901bf2dd36b8ebf91cec.tar.gz
wabt-47407e7f11a7cc4568b2901bf2dd36b8ebf91cec.tar.bz2
wabt-47407e7f11a7cc4568b2901bf2dd36b8ebf91cec.zip
Add wasmdump support for start section (#420)
Diffstat (limited to 'src/binary-reader-objdump.cc')
-rw-r--r--src/binary-reader-objdump.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/binary-reader-objdump.cc b/src/binary-reader-objdump.cc
index 3c83e693..ebbec6da 100644
--- a/src/binary-reader-objdump.cc
+++ b/src/binary-reader-objdump.cc
@@ -447,6 +447,8 @@ class BinaryReaderObjdump : public BinaryReaderObjdumpBase {
uint32_t item_index,
StringSlice name);
+ virtual Result OnStartFunction(uint32_t func_index);
+
virtual Result OnFunctionBodyCount(uint32_t count);
virtual Result OnElemSegmentCount(uint32_t count);
@@ -616,6 +618,15 @@ Result BinaryReaderObjdump::OnFunctionBodyCount(uint32_t count) {
return OnCount(count);
}
+Result BinaryReaderObjdump::OnStartFunction(uint32_t func_index) {
+ if (options->mode == ObjdumpMode::Headers) {
+ printf("start: %d\n", func_index);
+ } else {
+ PrintDetails(" - start function: %d\n", func_index);
+ }
+ return Result::Ok;
+}
+
Result BinaryReaderObjdump::OnImportCount(uint32_t count) {
return OnCount(count);
}