diff options
author | Sam Clegg <sbc@chromium.org> | 2016-10-31 16:58:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-31 16:58:52 -0700 |
commit | b284c48616fff555752b426f3792c0a24aad8ac1 (patch) | |
tree | 063fac8a849a6463537758536d9cc6692d459ed3 /src/wasm-binary-reader-objdump.h | |
parent | 5d6cd3e3a37c48327db5c67c5dc0cdf69f25973e (diff) | |
download | wabt-b284c48616fff555752b426f3792c0a24aad8ac1.tar.gz wabt-b284c48616fff555752b426f3792c0a24aad8ac1.tar.bz2 wabt-b284c48616fff555752b426f3792c0a24aad8ac1.zip |
wasmdump improvments (#192)
* wasmdump improvments
- Split into three different passes: headers, details, and raw
- Nest imports correctly
- Show element count as part of section header rather than on its
own line
Diffstat (limited to 'src/wasm-binary-reader-objdump.h')
-rw-r--r-- | src/wasm-binary-reader-objdump.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/wasm-binary-reader-objdump.h b/src/wasm-binary-reader-objdump.h index c0318f14..06a19118 100644 --- a/src/wasm-binary-reader-objdump.h +++ b/src/wasm-binary-reader-objdump.h @@ -24,15 +24,27 @@ struct WasmAllocator; struct WasmModule; struct WasmReadBinaryOptions; +typedef enum WasmObjdumpMode { + WASM_DUMP_HEADERS, + WASM_DUMP_DETAILS, + WASM_DUMP_DISASSEMBLE, + WASM_DUMP_RAW_DATA, +} WasmObjdumpMode; + typedef struct WasmObjdumpOptions { WasmBool headers; WasmBool verbose; WasmBool raw; WasmBool disassemble; WasmBool debug; + WasmObjdumpMode mode; + const char* infile; + const char* section_name; + WasmBool print_header; } WasmObjdumpOptions; WASM_EXTERN_C_BEGIN + WasmResult wasm_read_binary_objdump(struct WasmAllocator* allocator, const uint8_t* data, size_t size, |