Skip to content

Conversation

@tomasr
Copy link

@tomasr tomasr commented Sep 17, 2015

The GetValue() methods of ClrInstanceField, ClrStaticField and ClrThreadStaticField all convert string fields into a System.String value.

However it is often useful to want just the address of the String object, instead of getting the actual string contents. You can work around this currently by calling GetAddress() instead and then reading a pointer-sized value at that address, but it is inconvenient.

This patch adds an overload to all the GetValue() methods that allow you to control if String fields should be returned as the string contents or as the address of the underlying String object.

…w the caller to specify if String fields should be returned as System.String objects (current behavior) or the address of the String object should be returned instead.
leculver added a commit that referenced this pull request Sep 21, 2015
Add overloads to the GetValue() methods of ClrField classes that allo…
@leculver leculver merged commit 9dd6339 into microsoft:master Sep 21, 2015
@tomasr tomasr deleted the DontConvertStrings branch October 1, 2015 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants