forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix generating debug info for static fields (dotnet#95570)
Fixes dotnet#93868. The existing algorithm for generating debug info about static fields was: * If we're generating debug information about a type, generate debug information about all non-literal and non-RVA fields on it. This is both too little, and too much. It's too little: if the only thing we're touching on a type is reading/writing the static fields, we'd not be generating debug information for that type because the current logic only looks at methods and `MethodTable`s. It's too much: if we didn't touch any statics on the type, the static base wasn't generated either. Debug information would refer to something that doesn't exist. I'm updating this logic to look at actual bases instead - if a static/gcstatic/threadstatic/instance base was generated, generate debug info for the fields. Skip them otherwise because they got optimized away ("trimmed").
- Loading branch information
1 parent
24ee598
commit 00c9556
Showing
3 changed files
with
65 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters