Skip to content

Adding GetAppDomainName cDAC API - #117837

Merged
rcj1 merged 9 commits into
dotnet:mainfrom
rcj1:GetAppDomainName
Jul 29, 2025
Merged

rcj1 merged 9 commits into
dotnet:mainfrom
rcj1:GetAppDomainName

Conversation

@rcj1

@rcj1 rcj1 commented Jul 18, 2025

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings July 18, 2025 22:12

Copilot AI left a comment

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.

Pull Request Overview

This PR implements a GetAppDomainName cDAC (Contract Debug Access Components) API that enables retrieval of AppDomain friendly names through the data contract reader system. This functionality allows debugging tools to access AppDomain names in a structured way rather than relying on legacy debugging interfaces.

Key changes:

  • Adds FriendlyName field support to the AppDomain data contract infrastructure
  • Implements the GetFriendlyName() method in the Loader contract interface
  • Replaces the legacy implementation fallback with a full cDAC implementation in SOSDacImpl

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
SOSDacImpl.cs Implements GetAppDomainName method with cDAC contracts and debug validation
AppDomain.cs Adds FriendlyName property to AppDomain data structure
Loader_1.cs Implements GetFriendlyName method in Loader contract
ILoader.cs Adds GetFriendlyName method to ILoader interface
appdomain.hpp Adds FriendlyName field offset to cdac_data structure
datadescriptor.h Registers FriendlyName field in CDAC type definition
Loader.md Documents the new GetFriendlyName API and data contract field
Comments suppressed due to low confidence (1)

docs/design/datacontracts/Loader.md:272

  • Variable name 'pathStart' is misleading since it refers to the friendly name, not a path. Should be renamed to 'friendlyNamePtr' or similar.
    TargetPointer pathStart = target.ReadPointer(handle.Address + /* AppDomain::FriendlyName offset */);

Comment thread src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs Outdated
Comment thread src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs Outdated
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

…pl.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@rcj1
rcj1 marked this pull request as draft July 18, 2025 22:17
@rcj1
rcj1 marked this pull request as ready for review July 18, 2025 22:28
@rcj1
rcj1 requested a review from max-charlamb July 18, 2025 22:28
@rcj1 rcj1 mentioned this pull request Jul 21, 2025
31 of 32 tasks

@max-charlamb max-charlamb left a comment

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.

Should be good once you get the tests to pass

Comment thread docs/design/datacontracts/Loader.md Outdated
@rcj1

rcj1 commented Jul 22, 2025

Copy link
Copy Markdown
Contributor Author

This looks like some infrastructure timeouts + the one test failure looks similar to what you had been seeing with StackAndOtherTests

Comment thread docs/design/datacontracts/Loader.md Outdated
Comment thread docs/design/datacontracts/Loader.md

@max-charlamb max-charlamb left a comment

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.

lgtm

@rcj1
rcj1 merged commit 2d3bf38 into dotnet:main Jul 29, 2025
@rcj1
rcj1 deleted the GetAppDomainName branch July 29, 2025 01:39
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants