[cDAC] : Implement ClrDataModule GetName#125942
Merged
Conversation
Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/8d8354fa-39ad-4227-b870-1b29a92a587f
Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/39def273-a823-4c95-9f33-063d207f30d7
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
Contributor
There was a problem hiding this comment.
Pull request overview
Implements IXCLRDataModule.GetName in the cDAC legacy shim by sourcing the module “simple name” from the Loader contract, and extends the Loader contract/data model to surface that simple name from the target runtime.
Changes:
- Add
Module.SimpleName(UTF-8) to the Module data model + mock descriptors and implementILoader.GetSimpleName. - Implement
ClrDataModule.GetNameusingILoader.GetSimpleName. - Add tests for
GetSimpleNameand implement UTF-8 string reading in the test target; update Loader contract docs accordingly.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/native/managed/cdac/tests/TestPlaceholderTarget.cs | Implements ReadUtf8String for test targets. |
| src/native/managed/cdac/tests/MockDescriptors/MockDescriptors.cs | Adds Module.SimpleName to mock Module field descriptors. |
| src/native/managed/cdac/tests/MockDescriptors/MockDescriptors.Loader.cs | Extends module mock builder to allocate/write a UTF-8 simple name. |
| src/native/managed/cdac/tests/LoaderTests.cs | Adds GetSimpleName coverage across architectures. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/ClrDataModule.cs | Implements IXCLRDataModule.GetName via Loader contract. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Data/Module.cs | Adds SimpleName pointer to Data.Module materialization. |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Loader_1.cs | Adds ILoader.GetSimpleName implementation (currently in v1 contract impl). |
| src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/ILoader.cs | Adds GetSimpleName to Loader abstraction interface. |
| src/coreclr/vm/ceeload.h | Adds cdac_data<Module>::SimpleName offset for contracts. |
| docs/design/datacontracts/Loader.md | Documents GetSimpleName API + Module.SimpleName field + pseudocode. |
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/ClrDataModule.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/ClrDataModule.cs
Outdated
Show resolved
Hide resolved
...native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Loader_1.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/ClrDataModule.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Data/Module.cs
Show resolved
Hide resolved
noahfalk
approved these changes
Mar 23, 2026
hoyosjs
reviewed
Mar 24, 2026
...native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Loader_1.cs
Outdated
Show resolved
Hide resolved
…er.Contracts/Contracts/Loader_1.cs Co-authored-by: Juan Hoyos <19413848+hoyosjs@users.noreply.github.com>
hoyosjs
approved these changes
Mar 24, 2026
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/ClrDataModule.cs
Show resolved
Hide resolved
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/ClrDataModule.cs
Show resolved
Hide resolved
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Target.cs
Show resolved
Hide resolved
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader/ContractDescriptorTarget.cs
Show resolved
Hide resolved
Contributor
Contributor
Author
|
@copilot STOP!!! |
Contributor
Co-authored-by: rcj1 <77995559+rcj1@users.noreply.github.com> Agent-Logs-Url: https://github.com/dotnet/runtime/sessions/0e43d4be-e4a7-4497-9940-81a4b3a67490
Contributor
Author
|
/ba-g timeouts |
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.
No description provided.