superdump icon indicating copy to clipboard operation
superdump copied to clipboard

Add mex.dll extension usage please

Open jeffstokes72 opened this issue 5 years ago • 2 comments

https://blogs.msdn.microsoft.com/luisdem/2016/07/19/mex-debugging-extension-for-windbg-2/

https://www.microsoft.com/en-us/download/details.aspx?id=53304

Very powerful managed code and kernel debugging extension. Use it all the time.

Ideally the person installing would accept eula/drop in a folder and then the debug engine service would see it and leverage mex.dll for some additional debugging.

Thoughts?

jeffstokes72 avatar Sep 11 '18 21:09 jeffstokes72

Oh, sounds like a good idea.

I would rather not ship extensions with SuperDump directly (not sure about license implications), but one way, this could be made possible is to make the extensions that are being loaded by default customizable. That way, one would need to deploy mex.dll manually to the SuperDump host system, then would configure SuperDump to load this extension by default.

I see two places to use it:

  • windbg.log: This is the pre-populated log that spits out a bunch of interesting WinDbg commands. It already loads a set of extensions (https://github.com/Dynatrace/superdump/blob/master/src/SuperDump/Analyzers/WinDbgAnalyzer.cs#L55). If we'd make this list configurable, it would be possible to add some commands to the standard list of commands.
  • interactive mode: This is probably more interesting. For deep analysis the interactive mode is the best tool. Especially here you want to be able to have a powerful extension to look for the nasty details in a dump. However, this is more difficult to extend. It basically starts cdb.exe and hooks up input and output with a web-based terminal (websocket based). Now, there is a mechanism to enter commands after starting interactive mode, but it's a bit of a hack (https://github.com/Dynatrace/superdump/blob/e0c1bae4fd5229e02db5a426101be050e32f2a30/src/SuperDumpService/Webterm/WebTermHandler.cs#L96). These initialCommands are just executed in a 1 second delay. Still probably the best place to add this for now.

Anyway, what kind of integration are you looking for?

By the way: another extension that is a very useful addition to WinDbg: https://archive.codeplex.com/?p=netext

discostu105 avatar Sep 17 '18 21:09 discostu105

thanks for that suggestion. I use winde.dll alot as well.

Interactive I think is the best way to go.

jeffstokes72 avatar Sep 20 '18 15:09 jeffstokes72