Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[cDAC] Implement IXCLRDataProcess.EnumMethodInstancesByAddress #115131

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 24 commits into
base: main
Choose a base branch
from

Conversation

max-charlamb
Copy link
Contributor

@max-charlamb max-charlamb commented Apr 28, 2025

Contributes to #114336

Implements:
IXCLRDataProcess.StartEnumMethodInstancesByAddress
IXCLRDataProcess.EnumMethodInstancesByAddress
IXCLRDataProcess.EndEnumMethodInstancesByAddress
IXCLRDataMethodInstance.GetTokenAndScope
IXCLRDataMethodInstance.GetRepresentativeEntryAddress

These final two APIs allow me to test that enumerating the method instances return the correct COM object/data.

In order to implement these APIs, the following contracts were updated:

  • ILoader
    • IEnumerable<TargetPointer> GetAvailableTypeParams(ModuleHandle handle)
    • IEnumerable<TargetPointer> GetInstantiatedMethods(ModuleHandle handle)
  • IRuntimeTypeSystem
    • TargetPointer GetMethodDescForSlot(TypeHandle methodTable, ushort slot)
  • IECall, new contract for data related to calls into the runtime
    • TargetPointer MapTargetBackToMethodDesc(TargetCodePointer codePointer)

and the following data types were added:

  • EETypeHashTable to read available type parameters on a module
  • InstMethodHashTable to read instantiated methods in a module
  • ECHash to parse the FCall hash table and map entrypoints to FCall method descs.

Open Questions

  1. Where should I add MethodDesc::s_ClassificationSizeTable to the DAC Enum memory regions so it is present in all mini dumps?
  2. Should the RuntimeTypeSystem contract be updated here, or in another PR regarding the async changes? Do we need to do a contract bump?

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Apr 28, 2025
@max-charlamb max-charlamb added area-Diagnostics-coreclr and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Apr 28, 2025
Copy link
Contributor

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

MethodDescFlags_1.MethodDescFlags.ClassificationMask |
MethodDescFlags_1.MethodDescFlags.HasNonVtableSlot |
MethodDescFlags_1.MethodDescFlags.HasMethodImpl |
MethodDescFlags_1.MethodDescFlags.HasNativeCodeSlot));
Copy link
Member

Choose a reason for hiding this comment

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

This is out of date. The merge of the async logic has added a new flag.

Copy link
Member

Choose a reason for hiding this comment

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

In general, you need to review the updates done by async to see if there are any other changes we need, and if we need to bump a contract version.

@max-charlamb max-charlamb force-pushed the cdac-symbol-reading-3 branch from 04ea4de to dc87671 Compare May 6, 2025 15:27
@max-charlamb max-charlamb requested review from mikem8361, a team and davidwrighton May 6, 2025 20:28
@max-charlamb max-charlamb marked this pull request as ready for review May 6, 2025 21:15
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