Skip to content

Add crash dump callback#40674

Draft
kvega005 wants to merge 2 commits into
microsoft:masterfrom
kvega005:sdkCrashNotifications
Draft

Add crash dump callback#40674
kvega005 wants to merge 2 commits into
microsoft:masterfrom
kvega005:sdkCrashNotifications

Conversation

@kvega005
Copy link
Copy Markdown
Contributor

Summary of the Pull Request

Allows users to specify a callback that gets invoked after a crash dump is successfully written.

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Copilot AI review requested due to automatic review settings May 29, 2026 21:11
Copy link
Copy Markdown
Contributor

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

Adds crash dump callback support for WSLC sessions so SDK callers can be notified after a Linux crash dump is written.

Changes:

  • Adds ICrashDumpCallback to the WSLC COM IDL and wires it through session settings into WSLCVirtualMachine.
  • Adds public SDK callback types and WslcSetSessionSettingsCrashDumpCallback.
  • Adds crash dump callback tests for both WSLC COM/session behavior and the C SDK wrapper.

Reviewed changes

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

Show a summary per file
File Description
src/windows/service/inc/wslc.idl Defines the new COM callback interface and adds callback fields to session settings.
src/windows/service/exe/WSLCSessionManager.cpp Passes crash dump callback settings into per-user session initialization.
src/windows/wslcsession/WSLCVirtualMachine.h Stores the optional crash dump callback on the VM object.
src/windows/wslcsession/WSLCVirtualMachine.cpp Invokes the callback after writing a crash dump.
src/windows/WslcSDK/wslcsdk.h Adds public SDK callback types and setter declaration.
src/windows/WslcSDK/wslcsdk.cpp Creates and retains the COM bridge callback and exposes the new setter.
src/windows/WslcSDK/WslcsdkPrivate.h Extends internal session settings and session handle state for the callback.
src/windows/WslcSDK/CrashDumpCallback.h Declares the SDK-to-COM callback bridge.
src/windows/WslcSDK/CrashDumpCallback.cpp Implements the SDK-to-COM callback bridge.
src/windows/WslcSDK/CMakeLists.txt Adds the new callback bridge files to the SDK build.
src/windows/WslcSDK/wslcsdk.def Exports the new callback setter.
msipackage/package.wix.in Registers the new COM interface proxy/stub.
test/windows/WSLCTests.cpp Adds COM-level crash dump callback validation.
test/windows/WslcSdkTests.cpp Adds SDK-level crash dump callback validation.

Comment thread src/windows/wslcsession/WSLCVirtualMachine.cpp
Comment thread src/windows/WslcSDK/wslcsdk.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants