-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Emscripten post processing doesn't correctly update .debug_addr section #13099
Comments
emcc-01.zip contains the two relevant cc @pfaffe |
This is a minimal patch to add support for also updating the addresses stored in the .debug_addr DWARF section, which is used to perform address resolution at debug time with debug fission. This is minimal in the sence that it only supports the pre-DWARFv5 .debug_addr format that is emitted by Emscripten currently, and which only consists of a simple list of addresses. Ideally the copy of DWARFYAML in the Binaryen tree should be updated with LLVM ToT at some point, which will provide full support for DWARFv5 index tables, including the new .debug_addr format. Ref: WebAssembly#3460 Ref: emscripten-core/emscripten#13099 Bug: https://crbug.com/1161422
This is a minimal patch to add support for also updating the addresses stored in the .debug_addr DWARF section, which is used to perform address resolution at debug time with debug fission. This is minimal in the sence that it only supports the pre-DWARFv5 .debug_addr format that is emitted by Emscripten currently, and which only consists of a simple list of addresses. Ideally the copy of DWARFYAML in the Binaryen tree should be updated with LLVM ToT at some point, which will provide full support for DWARFv5 index tables, including the new .debug_addr format. Ref: WebAssembly#3460 Ref: emscripten-core/emscripten#13099 Bug: https://crbug.com/1161422
This is a minimal patch to add support for also updating the addresses stored in the .debug_addr DWARF section, which is used to perform address resolution at debug time with debug fission. This is minimal in the sence that it only supports the pre-DWARFv5 .debug_addr format that is emitted by Emscripten currently, and which only consists of a simple list of addresses. Ideally the copy of DWARFYAML in the Binaryen tree should be updated with LLVM ToT at some point, which will provide full support for DWARFv5 index tables, including the new .debug_addr format. Ref: WebAssembly#3460 Ref: emscripten-core/emscripten#13099 Bug: https://crbug.com/1161422
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant. |
Is this now fixed? |
I think this hasn't been fixed, but we've been focusing on avoiding running Binaryen at all during debugging, and that is basically achieved, so we can likely close this as not being a problem in practice. The major exception to that atm is Asyncify, which will always force Binaryen to run, but even that will go away once stack switching arrives (which is hopefully not far). |
Debug fission support for Emscripten with
-gsplit-dwarf
(#9871) seems to mostly work, except that the post processing in Emscripten (even when linking with-O0
or-O1
) doesn't update the.debug_addr
table correctly, and hence the debugger is unable to resolve the address indices later.I've uploaded a repro to https://github.com/bmeurer/split-dwarf-demo which illustrates the problem.
So the
wasm-emscripten-finalize
step apparently didn't update the.debug_addr
section at all. However looking into the binaries:We can see that
foo
was originally at offset 0x74 (relative to the start of theCode
section), but after the finalization step, it's at offset 0x72 (relative toCode
). The.debug_addr
table however still points to 0x74.The text was updated successfully, but these errors were encountered: