From b284c48616fff555752b426f3792c0a24aad8ac1 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Mon, 31 Oct 2016 16:58:52 -0700 Subject: 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 --- src/wasm-binary-reader-objdump.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/wasm-binary-reader-objdump.h') 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, -- cgit v1.2.3