alexcrichton opened PR #8753 from alexcrichton:fix-dwarf-debug-loc
to bytecodealliance:main
:
This commit is a fix to Wasmtime's DWARF processing transform to correct the meaning of the
.debug_loc
section. This section's addresses are relative to theDW_AT_low_pc
entry located in theDW_TAG_compile_unit
container, but Wasmtime's construction of this section didn't take this into account. Instead all addresses in.debug_loc
are relative to the start of the compiled object, not to the start of the compile unit itself. This commit fixes this by unconditionally describingDW_TAG_compile_unit
locations withDW_AT_ranges
instead ofDW_AT_low_pc
. This ends up fixing debug information for debug information using.debug_loc
with multiple codegen units.Closes #8752
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested wasmtime-core-reviewers for a review on PR #8753.
alexcrichton requested elliottt for a review on PR #8753.
elliottt submitted PR review.
alexcrichton merged PR #8753.
Last updated: Dec 23 2024 at 12:05 UTC