cmd/compile: debugger support for range-over-func #66468
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Range-over-func (#61405) statements are going to be compiled into closures passed to the iterator function. I.e. the following code:
becomes:
Delve (and potentially other debuggers) needs a way to correlate the stack frame where the body's closure is executing with the stack frame that it logically belongs to (the "parent" frame), for two reasons:
We have discussed during the go team/delve meetings possible solutions for this and the current plan is to keep the closure struct alive and make it accessible through a specially named variable DIE.
This issue is to track this problem (and also for cases where the binary is optimized and a lot of inlining happens to the range-over-func statement).
cc @derekparker @dr2chase
The text was updated successfully, but these errors were encountered: