-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[cDAC] implement IXCLRDataMethodInstance::GetName and associated APIs #118966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cDAC] implement IXCLRDataMethodInstance::GetName and associated APIs #118966
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements the IXCLRDataMethodInstance::GetName
method in the cDAC (contract-based Data Access Component) implementation, replacing a previously unimplemented stub that delegated to the legacy implementation.
Key changes:
- Implements method name generation using
TypeNameBuilder.AppendMethodInternal
with fallback mechanisms - Adds error handling and debug validation against the legacy implementation
- Improves robustness of string retrieval from EE addresses
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
ClrDataMethodInstance.cs | Implements GetName method with proper name formatting, fallback logic, and debug validation |
SOSDacImpl.cs | Removes nested try-catch block in GetMethodTableName method |
DacStreams_1.cs | Adds exception handling for VirtualReadException in StringFromEEAddress method |
src/native/managed/cdac/mscordaccore_universal/Legacy/ClrDataMethodInstance.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/ClrDataMethodInstance.cs
Show resolved
Hide resolved
54a82b9
to
84bc116
Compare
src/native/managed/cdac/mscordaccore_universal/Legacy/ClrDataFrame.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/ClrDataStackWalk.cs
Show resolved
Hide resolved
Co-authored-by: Noah Falk <[email protected]>
src/native/managed/cdac/mscordaccore_universal/Legacy/ClrDataMethodInstance.cs
Show resolved
Hide resolved
...d/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/StackWalk/StackWalk_1.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM otherwise
Implements:
IXCLRDataStackWalk::GetFrame
IXCLRDataFrame::GetMethodInstance
IXCLRDataMethodInstance::GetName
The former two are required to verify
GetName
as SOS usesIXCLRDataStackWalk::GetFrame
->IXCLRDataFrame::GetMethodInstance
to get the instantiation ofIXCLRDataMethodInstance it calls
GetName` on.Modifies:
IDacStreams_1.StringFromEEAddress
to not throw on read failure. Previously we wrapped this API in a try/catch, given it can return a null value, I believe it is acceptable to return null on read failures.