-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Remove AppDomain
parameter for Debugger::InitIPCEvent
#116871
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
Remove AppDomain
parameter for Debugger::InitIPCEvent
#116871
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 PR simplifies IPC event initialization by removing the AppDomain
parameter from Debugger::InitIPCEvent
and always using the current AppDomain internally.
- Deleted the four-parameter overload in the header.
- Updated all callers in
debugger.cpp
to use the three-parameter variant. - Inlined
VMPTR_AppDomain::MakePtr(AppDomain::GetCurrentDomain())
inside the implementation.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
src/coreclr/debug/ee/debugger.h | Removed the overload that accepted an AppDomain* . |
src/coreclr/debug/ee/debugger.cpp | Updated all InitIPCEvent calls to the new signature and defaulted the domain internally. |
Comments suppressed due to low confidence (2)
src/coreclr/debug/ee/debugger.cpp:2791
- Consider adding or updating unit tests to verify that vmAppDomain is correctly set for all IPC events, especially those that previously used
NullPtr
, to ensure the new default behavior is as intended.
);
src/coreclr/debug/ee/debugger.h:2768
- [nitpick] Update or add a comment here to explain that the AppDomain is now always the current domain and no longer needs to be passed in.
Thread *pThread)
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.
LGTM
/cc @dotnet/dotnet-diag
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
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.
LGTM
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.
It looks like there are places which are switching from NULL to GetCurrentAppDomain() which probably doesn't matter but there is a low chance it breaks something. If you haven't yet, can you test some basic debugging in Visual Studio like set a breakpoint in HelloWorld, hit it, and look at the locals?
I checked that basic debugging worked (helloworld, breakpoint, locals, eval in watch window). Also scanned through some of the reading of the IPC events and didn't see NULL obviously having some special meaning. |
Follow-up from #101749 (comment)
Always the one and only
AppDomain
.cc @dotnet/dotnet-diag @AaronRobinsonMSFT