- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5.2k
[cDAC] Refactor datadescriptor infrastructure #118453
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
[cDAC] Refactor datadescriptor infrastructure #118453
Conversation
There was a problem hiding this 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 pull request refactors the data descriptor infrastructure to enable creating multiple descriptors, moving from a monolithic approach to a reusable framework. The refactoring extracts common functionality into shared components and introduces a CMake function for generating descriptors.
- Extracts shared data descriptor code into a separate directory for reuse
- Introduces a CMake function generate_data_descriptorsto streamline descriptor creation
- Replaces hardcoded patterns with configurable contract names and pointer data names
- Adds comprehensive documentation for the refactored infrastructure
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description | 
|---|---|
| src/coreclr/debug/runtimeinfo/datadescriptor.inc | Removes wrapper macros and comments, keeping only the actual data definitions | 
| src/coreclr/debug/runtimeinfo/datadescriptor.h | New header containing all necessary includes for data descriptors | 
| src/coreclr/debug/runtimeinfo/CMakeLists.txt | Refactored to use the new generate_data_descriptorsfunction instead of inline logic | 
| src/coreclr/debug/datadescriptor-shared/datadescriptorwrapper.inc | New wrapper providing the macro definitions previously in datadescriptor.inc | 
| src/coreclr/debug/datadescriptor-shared/datadescriptor.cpp | Moved from runtime-specific location, now includes wrapper | 
| src/coreclr/debug/datadescriptor-shared/contractpointerdata.cpp | Refactored to use configurable names and support sub-descriptors | 
| src/coreclr/debug/datadescriptor-shared/contractdescriptorstub.c | Updated to use configurable contract and pointer data names | 
| src/coreclr/debug/datadescriptor-shared/contractconfiguration.h.in | Template for contract configuration parameters | 
| src/coreclr/debug/datadescriptor-shared/contract-descriptor.c.in | Updated template to use configurable names and conditional exports | 
| src/coreclr/debug/datadescriptor-shared/README.md | Comprehensive documentation for the refactored infrastructure | 
| src/coreclr/clrdatadescriptors.cmake | New CMake function implementing the two-phase build process | 
| src/coreclr/CMakeLists.txt | Includes the new data descriptors CMake module | 
| Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag | 
d58fdba    to
    8a6a118      
    Compare
  
    
Change the datadescriptor infrastructure to allow easily creating multiple descriptors. Used in #118050