Skip to content

Conversation

rcj1
Copy link
Contributor

@rcj1 rcj1 commented Aug 14, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings August 14, 2025 22:44
Copy link
Contributor

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

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 the GetClrWatsonBuckets API in the cDAC (Contract-based Data Access Component) system, providing a modern alternative to the legacy DAC implementation. The implementation retrieves Watson bucket data from exception objects for crash reporting and debugging purposes.

Key changes:

  • Adds Watson bucket retrieval functionality through Thread and Exception contracts
  • Creates new data structures for Object and updates ExceptionInfo to support Watson bucket access
  • Implements the complete API with proper error handling and legacy comparison in debug builds

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
SOSDacImpl.cs Implements the main GetClrWatsonBuckets API with contract-based logic and debug validation
Thread.cs Adds UEWatsonBucketTrackerBuckets field to Thread data structure
Object.cs Creates new Object data class with MethodTable property for Watson bucket object access
ExceptionInfo.cs Adds ExceptionWatsonBucketTrackerBuckets field for exception-specific Watson buckets
Thread_1.cs Implements three new Thread contract methods for retrieving throwable objects and Watson buckets
Exception_1.cs Implements GetWatsonBucketsFromThrowable method to extract Watson buckets from exception objects
IThread.cs Adds interface definitions for the new Thread contract methods
IException.cs Adds interface definition for GetWatsonBucketsFromThrowable method
threads.h Defines UEWatsonBucketTrackerBuckets offset in Thread cdac_data structure
exstatecommon.h Adds friend declarations and includes for cdac_data access
exinfo.h Defines ExceptionWatsonBucketTrackerBuckets offset in ExInfo cdac_data structure
datadescriptor.inc Registers new fields in CDAC type system and fixes Object field name
Thread.md Documents the new Thread contract methods with implementation examples
Exception.md Documents the new Exception contract method with implementation example

Copy link
Member

@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.

Given this requires some specific size data, I'm wondering if it would make sense to put part of this in the exception or thread contract.

We could discuss more at the meeting tomorrow.

@rcj1
Copy link
Contributor Author

rcj1 commented Aug 20, 2025

Given this requires some specific size data, I'm wondering if it would make sense to put part of this in the exception or thread contract.

We could discuss more at the meeting tomorrow.

Sure, we can move this to the thread contract.

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.

We should use the Object.GetArrayData() API rather than re-implementing it but otherwise looks good to me.

Removed comment about ensuring buffer size in debug mode.
@rcj1 rcj1 merged commit 99ed0ee into dotnet:main Sep 11, 2025
100 of 102 checks passed
@rcj1 rcj1 deleted the GetClrWatsonBuckets branch September 11, 2025 19:03
@github-actions github-actions bot locked and limited conversation to collaborators Oct 12, 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.

3 participants