Skip to content

Conversation

@max-charlamb
Copy link
Member

No description provided.

Copy link
Contributor

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 the GetMethodTableSlot and GetMethodTableSlotEnum interfaces for the Contract Data Access Component (cDAC) system. These additions enable enumeration and retrieval of method table slots in the managed debugging environment.

  • Implements GetMethodTableSlot to retrieve method entry points for specific slots in a method table
  • Adds GetMethodTableSlotEnumerator with a new SOSMethodEnum class for iterating through all methods in a method table
  • Extends the RuntimeTypeSystem contract with new APIs for slot management and method enumeration

Reviewed Changes

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

Show a summary per file
File Description
SOSDacImpl.cs Implements GetMethodTableSlot method and adds SOSMethodEnum class for method enumeration
ISOSDacInterface.cs Adds interface definitions for ISOSEnum, ISOSMethodEnum, and SOSMethodData structures
ConversionExtensions.cs Adds ToClrDataAddress extension method for TargetCodePointer
RuntimeTypeSystem_1.cs Implements core runtime type system methods for slot management and method enumeration
IRuntimeTypeSystem.cs Adds abstract contract definitions for new slot and method enumeration APIs
RuntimeTypeSystem.md Updates documentation with new API descriptions and implementation details

Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The slot stuff looked fine to me, though I'm sure David has more expertise there than I do.

Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the follow up from that discussion about the API surface would be to define slots and IntroducedMethodDescs such that they return 0/empty enumeration for non-MethodTable based types rather than throwing an exception. You could do it in this PR or a separate one - whatever feels easier.

@max-charlamb max-charlamb enabled auto-merge (squash) September 3, 2025 15:25
@max-charlamb max-charlamb merged commit b9fbc0d into dotnet:main Sep 3, 2025
47 of 49 checks passed
@max-charlamb max-charlamb deleted the cdac-methodtable-enum branch September 3, 2025 20:32
@github-actions github-actions bot locked and limited conversation to collaborators Oct 4, 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.

4 participants