[EE] Prettify compiler-generated field names with IDkmClrFullNameProvider.GetClrMemberName#50931
Closed
r-ramesh wants to merge 2 commits intodotnet:masterfrom
Closed
[EE] Prettify compiler-generated field names with IDkmClrFullNameProvider.GetClrMemberName#50931r-ramesh wants to merge 2 commits intodotnet:masterfrom
r-ramesh wants to merge 2 commits intodotnet:masterfrom
Conversation
Issue: - The debugger's NullReferenceException analysis feature figures out what was null through metadata and calls into the EE to display the offender as an expression. - If a field reference was null, we end up calling into GetClrMemberName. - However, for hoisted locals, etc we end up with an ugly mangled name like <myVar>5__1 was null. Changes: 1. Formatter: - Tweak implementation to handle compiler generated names. 2. CSharpFormatter: - Add implementation for C#. VB is still TODO. - Split up GeneratedNames so that it can be included in the CSharpResultProvider.
Contributor
Author
|
@tmat @ivanbasov Let me know your suggestions.. |
cston
reviewed
Feb 1, 2021
|
|
||
| index = -1; | ||
| return false; | ||
| } |
Contributor
There was a problem hiding this comment.
Is it necessary to move these methods to a separate file? Moving the methods makes it difficult to track changes.
It looks like it is necessary to move the methods to allow including this file in ResultProvider.csproj.
Comparing this file with the previous version, it looks like the only change is including IndexOfBalancedParenthesis().
cston
reviewed
Feb 1, 2021
| /// <summary> | ||
| /// Parses a compiler-generated name and returns the simpler user-visible name. | ||
| /// </summary> | ||
| internal override string PrettifyCompilerGeneratedName(string name) |
Contributor
There was a problem hiding this comment.
Perhaps SimplifyCompilerGeneratedName().
Contributor
Author
|
@cston Discussing this a bit further with the team I think it's better to have a new Concord API that is eventually implemented in Roslyn rather than piggybacking and overloading an existing one. I've added to you to the Concord PR.. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue:
<myVar>5__1was null.Changes: