Bug 4898 – Can't see parent function's variables from nested functions when debugging
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-09-19T14:24:58Z
Last change time
2019-08-20T22:08:54Z
Keywords
DebugInfo
Assigned to
No Owner
Creator
Aldo Nunez
Comments
Comment #0 by aldonunez1 — 2010-09-19T14:24:58Z
The debug info for a nested function has an entry for a "this" variable which points to the variables in the parent function that the nested function can use. The type of that variable is void*.
If it were a kind of struct, then we could see those dependent variables. This is particularly useful for closures where the user can't look at the enclosing function's frame directly.
Comment #1 by bearophile_hugs — 2010-09-19T18:02:23Z
Is this an enhancement request?
Comment #2 by aldonunez1 — 2010-09-20T21:03:48Z
I guess it would be an enhancement. I updated the bug.
Comment #3 by r.sagitario — 2019-08-20T22:08:54Z
added struct debug info to closure pointers in dmd 2.084