Skip to content

Handle pseudo-variables with pointer types - #1433

Merged
amcasey merged 5 commits into
dotnet:masterfrom
amcasey:DD1140387
Mar 20, 2015
Merged

amcasey merged 5 commits into
dotnet:masterfrom
amcasey:DD1140387

Conversation

@amcasey

@amcasey amcasey commented Mar 20, 2015

Copy link
Copy Markdown
Member

The intrinsic methods that we call to retrieve the values of pseudo-variables from the debugger return System.Object. Unfortunately, object cannot be converted (directly) to a pointer type. Instead, we need to unbox an IntPtr and then call an explicit conversion method to get a pointer.

Caveat: This won't work until the debugger actually returns a boxed IntPtr.

@amcasey

amcasey commented Mar 20, 2015

Copy link
Copy Markdown
Member Author

FYI @pnelsonmsft @cston @KevinH-MS @ManishJayaswal

@amcasey

amcasey commented Mar 20, 2015

Copy link
Copy Markdown
Member Author

I changed the compiler, @VSadov @AlekseyTs @gafter

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using Symbol rather than TSymbol. That is, change to GetSpecialTypeMember that returns a possibly null Symbol and have the caller cast if needed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried and didn't see a meaningful improvement.

@cston

cston commented Mar 20, 2015

Copy link
Copy Markdown
Contributor

LGTM

amcasey added 5 commits March 20, 2015 16:21
Pointer types can appear in assembly-qualified names (AQNs).  Our encoding
mechanism handles them, but our decoding mechanism does not.

Caveat: We now support arrays of pointers, but not pointers to arrays
(since neither C# nor VB supports such types).
The intrinsic methods that we call to retrieve the values of
pseudo-variables from the debugger return System.Object.  Unfortunately,
object cannot be converted (directly) to a pointer type.  Instead, we need
to unbox an IntPtr and then call an explicit conversion method to get a
pointer.

Caveat: This won't work until the debugger actually returns a boxed
IntPtr.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the TryGet method places null into its out parameter when it returns false, so you can simplify this to

TryGetSpecialTypeMember(this.Compilation, member, syntax, diagnostics, out memberSymbol);
return memberSymbol;

Though I admit that may be less clear.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would, but the Jenkins run has already passed. ;)

@gafter

gafter commented Mar 20, 2015

Copy link
Copy Markdown
Member

LGTM

amcasey added a commit that referenced this pull request Mar 20, 2015
Handle pseudo-variables with pointer types
@amcasey
amcasey merged commit fa5f370 into dotnet:master Mar 20, 2015
JoeRobich pushed a commit that referenced this pull request Aug 18, 2026
Add a changelog format that makes it easier to add a changelog for VS Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants