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.
Comment From: gopherbot
Change https://go.dev/cl/591595 mentions this issue: cmd/compile/internal/ssa: fix DWARF location expr for .closureptr