wasm-opt demangling

33 views
Skip to first unread message

Stanislav

unread,
Nov 26, 2019, 10:46:28 PM11/26/19
to emscripten-discuss

Hi,


I generated WASM with C++ function names (DEMANGLE_SUPPORT is enabled).

After using wasm-opt, all symbolic names are replaced with numeric indices.

I tested wasm-opt with not optimizing parameters:

wasm-opt --optimize-level 0 --shrink-level 0 source.wasm -o dest.wasm


but the result hasn’t changed.



Is there any way to save demangle C++ function names when using wasm-opt?


Thanks

Alon Zakai

unread,
Nov 26, 2019, 11:15:55 PM11/26/19
to emscripte...@googlegroups.com
wasm-opt has a "-g" parameter, which makes it save debug info like function names. Does adding -g fix it?

(Also to get function names in a wasm file in the first place, emcc must be run with --profiling, or --profiling-funcs, -g, or a similar option.)


--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/ab7e5990-f250-4d5f-b326-3f72979e3227%40googlegroups.com.

Stanislav

unread,
Nov 27, 2019, 1:17:53 AM11/27/19
to emscripten-discuss
Adding "-g" works prefectly.
Thank you.


On Tue, Nov 26, 2019 at 1:15:55 Alon Zakai wrote:
wasm-opt has a "-g" parameter, which makes it save debug info like function names. Does adding -g fix it?

(Also to get function names in a wasm file in the first place, emcc must be run with --profiling, or --profiling-funcs, -g, or a similar option.)


On Tue, Nov 26, 2019 at 7:46 PM Stanislav <sta...@gmail.com> wrote:

Hi,


I generated WASM with C++ function names (DEMANGLE_SUPPORT is enabled).

After using wasm-opt, all symbolic names are replaced with numeric indices.

I tested wasm-opt with not optimizing parameters:

wasm-opt --optimize-level 0 --shrink-level 0 source.wasm -o dest.wasm


but the result hasn’t changed.



Is there any way to save demangle C++ function names when using wasm-opt?


Thanks

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages