I think this is because 1.39.0 changed the backend to upstream, and the
upstream backend uses human-readable names in the wasm names section, so
they show up in stack traces.

I'm not aware of a good way to work around this, I'm afraid. I've
complained about it but there seems no consensus on changing it, as overall
human-readable names in stack traces are generally what users want.

Sorry about this, I know it's annoying. Some things you can do:

* Inspect the relevant .o file, as the names are demangled during the link
stage, so if you know the object file, the name will be in there. Use
wasm-objdump -d for this as other disassemblers may not work.

* Compile a small program: https://stackoverflow.com/a/12406668/1176841

We should perhaps look into creating a tool like the reverse of c++filt to
mangle names easily. However, after 10 minutes of searching I can't find a
good codebase for that (e.g. LLVM's is internal and would be hard to
extract, and I can't find any standalone ones).


On Fri, Jan 31, 2020 at 8:24 AM Rohit Saini <[email protected]>
wrote:

> Hi All,
>
> Previously we were using emscripten 1.38.28 version, and when we were
> making debug build with --profiling --profiling-func, the stack trace we
> were getting on exception was with mangled c++ names.
> But now as we are updating to emscripten 1.39.6 , the stack trace we are
> getting has c++ function names in demangled forms. I need mangled C++ names
> to add to EXPORTED_FUNCTIONS and EXCEPTION_CATCHING_WHITELIST Is there
> any way to get mangled C++ names in stack trace or better if I can get a
> list of mangled names of all the functions.
>
> I tried DEMANGLE_SUPPORT=0 but still not getting mangled c++ names.
> I also tried --emit-symbol-map but map I am getting has only some
> functions with mangled C++ names, all other are in the unmangled form.
>
> Regards,
>
>
>
>
>
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/emscripten-discuss/d340ff0d-2770-4f01-b3bf-b0525af7a9d7%40googlegroups.com
> <https://groups.google.com/d/msgid/emscripten-discuss/d340ff0d-2770-4f01-b3bf-b0525af7a9d7%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpRnjbFv6iO_D5FgH0JLRAHrvaJsx0zkX2CKeS5CFCqR4w%40mail.gmail.com.

Reply via email to