Adding GetNumLocalVariables and GetNumArguments cDAC APIs#120064
Merged
rcj1 merged 8 commits intodotnet:mainfrom Oct 11, 2025
Merged
Adding GetNumLocalVariables and GetNumArguments cDAC APIs#120064rcj1 merged 8 commits intodotnet:mainfrom
rcj1 merged 8 commits intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements cDAC APIs for retrieving method argument and local variable counts from IL method headers. The changes add support for parsing ECMA-335 compliant method signatures and IL headers to determine the number of arguments and local variables in a method.
- Adds
GetNumArgumentsAPI that reads method signature headers to count parameters - Adds
GetNumLocalVariablesAPI that parses IL headers to extract local variable counts - Introduces helper method
IsILto check if a method is IL-backed
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| IXCLRData.cs | Adds CorILMethodFlags enum for parsing IL method header formats |
| ClrDataFrame.cs | Implements GetNumArguments and GetNumLocalVariables methods with metadata parsing logic |
| RuntimeTypeSystem_1.cs | Adds IsIL helper method implementation |
| IRuntimeTypeSystem.cs | Adds IsIL method declaration to interface |
| RuntimeTypeSystem.md | Documents the IsIL API and its implementation algorithm |
src/native/managed/cdac/mscordaccore_universal/Legacy/ClrDataFrame.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/ClrDataFrame.cs
Outdated
Show resolved
Hide resolved
Contributor
|
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
src/native/managed/cdac/mscordaccore_universal/Legacy/ClrDataFrame.cs
Outdated
Show resolved
Hide resolved
jkotas
reviewed
Sep 24, 2025
src/native/managed/cdac/mscordaccore_universal/Legacy/IXCLRData.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/ClrDataFrame.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/ClrDataFrame.cs
Outdated
Show resolved
Hide resolved
3 tasks
jkotas
reviewed
Sep 26, 2025
src/native/managed/cdac/mscordaccore_universal/Legacy/HeaderReaderHelpers.cs
Outdated
Show resolved
Hide resolved
jkotas
reviewed
Sep 26, 2025
jkotas
reviewed
Sep 26, 2025
src/native/managed/cdac/mscordaccore_universal/Legacy/HeaderReaderHelpers.cs
Outdated
Show resolved
Hide resolved
jkotas
reviewed
Sep 26, 2025
max-charlamb
reviewed
Oct 1, 2025
Contributor
Author
|
diagnostics fails unrelated |
max-charlamb
approved these changes
Oct 3, 2025
Member
max-charlamb
left a comment
There was a problem hiding this comment.
lgtm modulo single comment
src/native/managed/cdac/mscordaccore_universal/Legacy/HeaderReaderHelpers.cs
Outdated
Show resolved
Hide resolved
jkotas
reviewed
Oct 3, 2025
src/native/managed/cdac/mscordaccore_universal/Legacy/HeaderReaderHelpers.cs
Show resolved
Hide resolved
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.