-
-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wasm: missing DWARF info support #4801
Comments
The dwarf version can be customized via |
warning: unsupported DWARF version (5)
emcc: error: '/home/kassane/.cache/zig/p/1220d2b37748757d43de92f0ef723b6a00c3cae4b6a9c582b607421704498a5cfd2b/upstream/bin/wasm-emscripten-finalize -g --dyncalls-i64 --pass-arg=legalize-js-interface-exported-helpers --dwarf /home/kassane/sokol-d/.zig-cache/o/1e52826a2383e678930d2511f19510f4/mrt.wasm -o /home/kassane/sokol-d/.zig-cache/o/1e52826a2383e678930d2511f19510f4/mrt.wasm --detect-features' failed (received SIGABRT (-6))
warning: unknown subopcode 5 (this may be an unsupported version of DWARF)
warning: unknown subopcode 37 (this may be an unsupported version of DWARF)
warning: unknown subopcode 5 (this may be an unsupported version of DWARF)
warning: unknown subopcode 5 (this may be an unsupported version of DWARF)
warning: unknown subopcode 5 (this may be an unsupported version of DWARF)
warning: unknown subopcode 5 (this may be an unsupported version of DWARF)
warning: unknown subopcode 5 (this may be an unsupported version of DWARF)
warning: unknown subopcode 5 (this may be an unsupported version of DWARF)
warning: unknown subopcode 91 (this may be an unsupported version of DWARF)
warning: unknown subopcode 58 (this may be an unsupported version of DWARF)
warning: unknown subopcode 58 (this may be an unsupported version of DWARF)
warning: unknown subopcode 6 (this may be an unsupported version of DWARF)
Fatal: TODO: DW_LNE_define_file
emcc: error: '/home/kassane/.cache/zig/p/1220d2b37748757d43de92f0ef723b6a00c3cae4b6a9c582b607421704498a5cfd2b/upstream/bin/wasm-emscripten-finalize -g --dyncalls-i64 --pass-arg=legalize-js-interface-exported-helpers --dwarf /home/kassane/sokol-d/.zig-cache/o/27a23c060d380acccbb71e1bfcd940a5/mrt.wasm -o /home/kassane/sokol-d/.zig-cache/o/27a23c060d380acccbb71e1bfcd940a5/mrt.wasm --detect-features' failed (returned 1) |
So looks like emcc requires v5 then. I doubt any of this is LDC-related, all Emscripten toolchain specifics. |
emcc + zig works. Some toolchains have succeeded in doing this and some haven't. --- edit fix: rust emit Dwarf in debug, too. |
Well AFAICT from your output is that your |
|
Hmm, testing |
Same error, here!! But, in my test replaced
shared:DEBUG: successfully executed llvm-objcopy /home/kassane/sokol-d/.zig-cache/o/1d4093d9132d19456afa339ce9cb9584/mrt.wasm /home/kassane/sokol-d/.zig-cache/o/1d4093d9132d19456afa339ce9cb9584/mrt.wasm --remove-section=.debug* --remove-section=producers
extract_metadata:DEBUG: no start/stop symbols found for section: em_asm
shared:DEBUG: successfully executed wasm-opt --version
shared:DEBUG: successfully executed wasm-emscripten-finalize -g --dyncalls-i64 --pass-arg=legalize-js-interface-exported-helpers --dwarf --output-source-map-url=mrt.wasm.map /home/kassane/sokol-d/.zig-cache/o/1d4093d9132d19456afa339ce9cb9584/mrt.wasm -o /home/kassane/sokol-d/.zig-cache/o/1d4093d9132d19456afa339ce9cb9584/mrt.wasm --detect-features --input-source-map=/home/kassane/sokol-d/.zig-cache/o/1d4093d9132d19456afa339ce9cb9584/mrt.wasm.map --output-source-map=/home/kassane/sokol-d/.zig-cache/o/1d4093d9132d19456afa339ce9cb9584/mrt.wasm.map
building:DEBUG: saving debug copy /tmp/emscripten_temp/emcc-03-wasm-emscripten-finalize.wasm Check object llvm-dwarfdump .zig-cache/o/eeee9973a88fce373cb2a65fda350905/mrt.o | head -n 10
.zig-cache/o/eeee9973a88fce373cb2a65fda350905/mrt.o: file format WASM
.debug_info contents:
0x00000000: Compile Unit: length = 0x0000678d, format = DWARF32, version = 0x0004, abbr_offset = 0x0000, addr_size = 0x04 (next unit at 0x00006791)
0x0000000b: DW_TAG_compile_unit
DW_AT_producer ("LDC 1.40.0-git-dd44cfa (LLVM 19.1.3)")
DW_AT_language (DW_LANG_D)
DW_AT_name ("./src/examples/shaders/mrt.d")
DW_AT_stmt_list (0x00000000) |
add: warning: unsupported DWARF version (5)
unsupported form
UNREACHABLE executed at /b/s/w/ir/cache/builder/emscripten-releases/binaryen/third_party/llvm-project/DWARFFormValue.cpp:349!
emcc: error: 'wasm-emscripten-finalize -g --dyncalls-i64 --pass-arg=legalize-js-interface-exported-helpers --dwarf --output-source-map-url=mrt.wasm.map /home/kassane/sokol-d/.zig-cache/o/18739005f3e46e38d8e34fcc469463e0/mrt.wasm -o /home/kassane/sokol-d/.zig-cache/o/18739005f3e46e38d8e34fcc469463e0/mrt.wasm --detect-features --input-source-map=/home/kassane/sokol-d/.zig-cache/o/18739005f3e46e38d8e34fcc469463e0/mrt.wasm.map --output-source-map=/home/kassane/sokol-d/.zig-cache/o/18739005f3e46e38d8e34fcc469463e0/mrt.wasm.map' failed (received SIGABRT (-6)) |
Environment
OS: ArchLinux
CPU: x86_64(zen3)
LDC version: master (ref.: v1.40.0-beta6)
Emscripten version: 3.1.73 (LLVM 20)
I have been attempting to get results in flamegraph for wasm and debugging too. However, the binary generated doesn't identify dwarf.
Flags added:
-g --exception-model=wasm -wasm-enable-eh
output error
If replace
--exception-model=wasm
to--exception-model=dwarf
output error
Expected
No error!
Reference
The text was updated successfully, but these errors were encountered: