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

Implement SOS Hosting for Windows (dotnet-dump) #352

Merged
merged 4 commits into from Jun 22, 2019

Conversation

mikem8361
Copy link
Member

Defined all the dbgeng delegates needed to implement the subset of the
IDebugClient and related interfaces to host SOS on Windows. Also modified
various parts of the native SOS to be able to be hosted.

Changed the Ext* and DML* output functions to formatted the output before
sending it to IDebugControl::OutputVaList. There is no way to create a
cdecl reverse pinvoke. The "args" OutputVaList is ignored when hosted.

Changed from IDebugAdvanced3 to IDebugAdvanced.

Cleanup (remove globals, etc.) exts.cpp DebugExtensionNotify code to make sure
none of the globals initialized by the original code are used because these
DebugExtensionInitialize, DebugExtensionNotify and DebugExtensionUninitialize
are only called when sos is running under cdb/windbg.

Simplified ProvideLibraryInternal (used by clrstack -i only) to work on a hosted
sos. It originally was using dbgeng functions that can't be supported.

Added 2.1 version of DumpTieredNativeCodeAddressInfo (not used yet).

Enable dotnet-dump testing on Windows.

Delete useless createdump commmand.

Remove spurious error message in GetCoreClrDirectory.

Update to latest symstore: 1.0.0-dev-64131-02.

Update dummy native projects to 2019.

@mikem8361 mikem8361 added this to the 3.0 milestone Jun 20, 2019
@mikem8361 mikem8361 self-assigned this Jun 20, 2019
@mikem8361 mikem8361 requested a review from noahfalk June 20, 2019 04:15
Defined all the dbgeng delegates needed to implement the subset of the
IDebugClient and related interfaces to host SOS on Windows. Also modified
various parts of the native SOS to be able to be hosted.

Changed the Ext* and DML* output functions to formatted the output before
sending it to IDebugControl::OutputVaList. There is no way to create a
cdecl reverse pinvoke. The "args" OutputVaList is ignored when hosted.

Changed from IDebugAdvanced3 to IDebugAdvanced.

Cleanup (remove globals, etc.) exts.cpp DebugExtensionNotify code to make sure
none of the globals initialized by the original code are used because these
DebugExtensionInitialize, DebugExtensionNotify and DebugExtensionUninitialize
are only called when sos is running under cdb/windbg.

Simplified ProvideLibraryInternal (used by clrstack -i only) to work on a hosted
sos. It originally was using dbgeng functions that can't be supported.

Added 2.1 version of DumpTieredNativeCodeAddressInfo (not used yet).

Enable dotnet-dump testing on Windows.

Delete useless createdump commmand.

Remove spurious error message in GetCoreClrDirectory.

Update to latest symstore: 1.0.0-dev-64131-02.

Update dummy native projects to 2019.
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.

I didn't go into too much detail but everything seemed reasonable on the surface. A few questions/comments inline

eng/Tools.props Show resolved Hide resolved
src/SOS/SOS.Hosting/Amd64Context.cs Outdated Show resolved Hide resolved
src/Tools/dotnet-dump/Commands/SOSCommand.cs Outdated Show resolved Hide resolved
@tommcdon tommcdon added this to Needs Triage in .NET Core Diagnostics via automation Jun 21, 2019
@tommcdon tommcdon moved this from Needs Triage to In Progress in .NET Core Diagnostics Jun 21, 2019
@mikem8361 mikem8361 merged commit c9c8c52 into dotnet:master Jun 22, 2019
.NET Core Diagnostics automation moved this from In Progress to Done Jun 22, 2019
@mikem8361 mikem8361 deleted the winsos branch June 22, 2019 02:31
@github-actions github-actions bot locked and limited conversation to collaborators Jan 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants