Skip to content

Adding GetAppDomainName cDAC API #117837

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

rcj1
Copy link
Contributor

@rcj1 rcj1 commented Jul 18, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings July 18, 2025 22:12
Copy link
Contributor

@Copilot Copilot AI left a 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 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 */);

Copy link
Contributor

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

@rcj1 rcj1 marked this pull request as draft July 18, 2025 22:17
Copy link
Contributor

@max-charlamb max-charlamb left a comment

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

@rcj1
Copy link
Contributor Author

rcj1 commented Jul 22, 2025

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

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.

2 participants