dotnet / diagnostics

This repository contains the source code for various .NET Core runtime diagnostic tools and documents.
MIT License
1.19k stars 356 forks source link

Ability to load extensions in dotnet-dump analyze #1031

Open joseotavioq opened 4 years ago

joseotavioq commented 4 years ago

It would be amazing if we can load extensions in dotnet-dump analyze, like "mex", "sosex", "netext".

mikem8361 commented 4 years ago

This is a great idea but actually implementing it has some problems. SOS had to be changed to be "hostable" under dotnet-dump. Some of the dbgeng APIs were hard or impossible to implement so changes were made on in the SOS native code (i.e. the cdecl variable-parameter Output* functions). And there are quite a few of the many dbgeng interfaces that are not implemented which we don't currently have the resources.

mikem8361 commented 4 years ago

"mex" is mostly managed code and would need to change to hook into dotnet-dump and dotnet-dump needs more work to provide these hooks. It looks like it works for the desktop CLR and Windows only.

"sosex" is an external extension that also is desktop/Windows only and hasn't been updated since 2016.

"netex" works only on desktop/Windows and would need work to be hostable under dotnet-dump.