Skip to content
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] Implement ISOSDacInterface::GetObjectData getting COM RCW/CCW #105846

Merged
merged 8 commits into from
Aug 6, 2024

Conversation

elinor-fung
Copy link
Member

@elinor-fung elinor-fung commented Aug 1, 2024

  • Add SyncTableEntry, SyncBlock, InteropSyncBlockInfo data descriptors, SyncTableEntries global
  • Get the sync block corresponding to a given object address in Object contract
  • Add GetComData to Object contract
  • Finish implementation of ISOSDacInterface::GetObjectData such that it populates the RCW/CCW
  • Add test helpers for mocking out sync blocks

Contributes to #99302

Manually validated with a COM server and callback that the RCW/CCW were set when expected and matched values returned by DAC.
Ran SOS unit tests from diagnostics repo using private build.

struct cdac_data<InteropSyncBlockInfo>
{
#ifdef FEATURE_COMINTEROP
static constexpr size_t CCW = offsetof(InteropSyncBlockInfo, m_pCCW);
Copy link
Member

Choose a reason for hiding this comment

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

I assume this is only for built-in. Are we going to defer ComWrappers support for later? Same for RCW.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. I deferred for later.

I went back and forth on object contract should have

  1. GetComData for built-in and GetComWrappersData for ComWrappers
  2. GetComData for both built-in and ComWrappers
  3. Separate functions for each (trying to thing of names was a struggle) - GetRCW/CCW (built-in), GetComWrappersRCW, GetComWrappersManagedObjectWrapperList

I ended up with (1) - definitely open to thoughts.

Copy link
Member

Choose a reason for hiding this comment

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

What about if we call it "BuiltInComData" to match how our docs and current code talk about built-in COM vs ComWrappers?

Then in the future, the contract to pull data about built-in RCWs and CCWs could be called "BuiltInCom" and the ComWrappers one could be "ComWrappers".

Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed to GetBuiltInComData

src/native/managed/cdacreader/src/Contracts/Object_1.cs Outdated Show resolved Hide resolved
docs/design/datacontracts/Object.md Outdated Show resolved Hide resolved
docs/design/datacontracts/Object.md Outdated Show resolved Hide resolved
Co-authored-by: Aaron Robinson <arobins@microsoft.com>
@elinor-fung elinor-fung merged commit c5a89d4 into dotnet:main Aug 6, 2024
152 checks passed
@elinor-fung elinor-fung deleted the cdac-object-data-com branch August 6, 2024 19:38
@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 2024
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