Skip to content

Abstract away debug read/write channel.#123196

Merged
AaronRobinsonMSFT merged 4 commits intodotnet:mainfrom
AaronRobinsonMSFT:clean_up_debug
Jan 23, 2026
Merged

Abstract away debug read/write channel.#123196
AaronRobinsonMSFT merged 4 commits intodotnet:mainfrom
AaronRobinsonMSFT:clean_up_debug

Conversation

@AaronRobinsonMSFT
Copy link
Member

No description provided.

@AaronRobinsonMSFT AaronRobinsonMSFT added this to the 11.0.0 milestone Jan 14, 2026
Copilot AI review requested due to automatic review settings January 14, 2026 22:18
@AaronRobinsonMSFT AaronRobinsonMSFT requested review from hoyosjs and removed request for Copilot January 14, 2026 22:18
@AaronRobinsonMSFT AaronRobinsonMSFT marked this pull request as draft January 14, 2026 22:18
@AaronRobinsonMSFT
Copy link
Member Author

/cc @dotnet/dotnet-diag

@dotnet-policy-service
Copy link
Contributor

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

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.

A few suggestions inline, but this looks nice to me. Thanks @AaronRobinsonMSFT!

@AaronRobinsonMSFT AaronRobinsonMSFT marked this pull request as ready for review January 22, 2026 18:18
Copilot AI review requested due to automatic review settings January 22, 2026 18:18
Copy link
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

This pull request refactors the debug transport layer by introducing an IDebugChannel COM interface to abstract the communication channel previously implemented directly with TwoWayPipe. This abstraction enables cleaner separation of concerns and potentially allows for different transport implementations in the future.

Changes:

  • Introduced IDebugChannel interface with methods for connection management and read/write operations
  • Refactored DbgTransportSession to use IDebugChannel* instead of direct TwoWayPipe usage
  • Implemented DbgTransportPipeChannel as a COM wrapper around TwoWayPipe
  • Created DebuggerStartUp helper class to encapsulate startup notification logic
  • Fixed header guard naming in processdescriptor.h to match the file name
  • Made InitIPCEvent public to support the new DebuggerStartUp abstraction
  • Unified CleanupTargetProcess() across all platforms in the native pipeline

Reviewed changes

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

Show a summary per file
File Description
src/coreclr/debug/shared/dbgtransportsession.cpp Main implementation of IDebugChannel abstraction, including DbgTransportPipeChannel wrapper class and updated session management
src/coreclr/debug/inc/dbgtransportsession.h IDebugChannel interface definition, replaced TwoWayPipe member with IDebugChannel pointer, moved statistics block
src/coreclr/debug/inc/processdescriptor.h Fixed header guard naming from _PROCESSCONTEXT_H to PROCESSDESCRIPTOR_H
src/coreclr/debug/ee/debugger.h Made InitIPCEvent public and removed RaiseStartupNotification declaration
src/coreclr/debug/ee/debugger.cpp Introduced DebuggerStartUp class to encapsulate startup logic, moved RaiseStartupNotification implementation
src/coreclr/debug/di/windowspipeline.cpp Added CleanupTargetProcess() no-op implementation for Windows
src/coreclr/debug/di/process.cpp Fixed typo in comment, updated documentation, removed platform-specific ifdef
src/coreclr/debug/di/nativepipeline.h Made CleanupTargetProcess() a pure virtual method for all platforms
src/coreclr/debug/di/dbgtransportpipeline.cpp Removed platform-specific ifdef around CleanupTargetProcess()

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@AaronRobinsonMSFT AaronRobinsonMSFT merged commit 4435e48 into dotnet:main Jan 23, 2026
104 checks passed
@github-project-automation github-project-automation bot moved this to Done in AppModel Jan 23, 2026
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the clean_up_debug branch January 23, 2026 15:49
@github-actions github-actions bot locked and limited conversation to collaborators Feb 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants