cmd/compile: DWARF locations for .closureptr synthetic var are not correct #67918
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
Debugging
FixPending
Issues that have a fix which has not yet been reviewed or submitted.
NeedsFix
The path to resolution is known, but the work has not been done.
release-blocker
Milestone
The recently submitted CL https://go.dev/cl/586975 adds support to the Go compiler for emitting a compiler-synthesized ".closureptr" variable within functions corresponding to range func bodies; this variable is used to store a pointer to the yield func being passed in, which the debugger needs to know in order to connect up variable refs in the range body with their corresponding definitions in the outer func.
Turns out that the DWARF location expressions emitted for this var are not correct; because the ctxt arrives in a registers, there is a window within the func prolog where the debugger needs to pick it out of the reg as opposed to its spill location on the stack. This issue is to track this problem, which needs to be resolved before we ship the release.
It should be possible to augment the existing debug infrastructure developed for the register ABI (see issue #45720) to tackle this problem.
The text was updated successfully, but these errors were encountered: