D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4898 - Can't see parent function's variables from nested functions when debugging
Summary: Can't see parent function's variables from nested functions when debugging
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P3 enhancement
Assignee: No Owner
URL:
Keywords: DebugInfo
Depends on:
Blocks:
 
Reported: 2010-09-19 14:24 UTC by Aldo Nunez
Modified: 2019-08-20 22:08 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Aldo Nunez 2010-09-19 14:24:58 UTC
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 bearophile_hugs 2010-09-19 18:02:23 UTC
Is this an enhancement request?
Comment 2 Aldo Nunez 2010-09-20 21:03:48 UTC
I guess it would be an enhancement. I updated the bug.
Comment 3 Rainer Schuetze 2019-08-20 22:08:54 UTC
added struct debug info to closure pointers in dmd 2.084