Releases: lordmilko/DebugTools
DebugTools 0.3.0
New Features
-
Add
Get-DbgProxycmdlet (experimental): creates a proxy around an object contained in another process, and allows interacting with it as if it were a nativedynamicobject! Very cool -
Add
Get-PEHeadercmdlet. Emits the in-memory PE Header based on a specified process + module name -
Add
Get-DbgStaticFieldcmdlet. Lists all static fields contained in a remote process (Note: due to the way generic types are implemented within the CLR, this cmdlet may or may not find static fields contained within certain generic. Also, see known issues below) -
Add
Get-UiMessagecmdlet (experimental): allows monitoring the window messages of a target process (similar to Spy++). Currently only provides enhancedWPARAM/LPARAManalysis of a limited subset of message types.When monitoring messages that have the same
WPARAM/LPARAMmeanings (e.g. inWM_MOUSEMOVEandWM_LBUTTONDOWN, theWPARAMandWPARAMareKeyModifiersandX + Yrespectively)Get-UiMessagewill synthesize a custom PowerShell Object Format so that you can easily see what values are contained within the window messages, rather than simply looking at meaninglessWPARAM/LPARAMcolumns -
Add
Send-UiMessagecmdlet (experimental): allows sending arbitrary window message values to a target process. Marshalling of customWPARAM/LPARAMstructures is not yet implemented -
Add initial support for performing UI automation (experimental)
Improvements
- Add
-Synchronousparameter toStart-DbgProfiler. Allows synchronously receiving events from the profiler, guaranteeing that all events arrive (at the cost of performance). Useful when a complex target (such as Visual Studio) is generating way too many events for ETW to deal with
Bugfixes
- Fix the profiler crashing attempting to read pointers that are not null terminated
Known Issues
Get-DbgStaticFieldwill crash when attempting to process types that are nested inside of generic types. Specify more specific filters so these don't get caught
DebugTools 0.2.0
New Features
- Add
Get-DbgProfilerStaticFieldcmdlet. Allows reading the values of static fields. Due to limitations of the CLR, currently only allows reading primitive values + strings - Add
Get-MethodTableandGet-MethodDesccmdlets. Allows displaying information about the rawMethodTableandMethodDescof a type in the current process - Allow reading raw
MethodTableandMethodDescstructures in a remote process by specifying-RawtoGet-SOSMethodTableandGet-SOSMethodDescrespectively - Add
Import-DbgProfilerStackTraceandExport-DbgProfilerStackTracecmdlets. Allows importing/exporting traces to files
Improvements
- Prevent
ProfilerSessionfrom initiating tracing again after ETW ThreadProc has thrown an unhandled exception - Cache both successful and unsuccessful generic types the profiler has attempted to resolve, preventing an EETypeLoadException being repeatedly thrown if we weren't able to resolve a given type
- Add
-IgnorePointerValuetoStart-DbgProfilerto prevent the profiler from attempting to read pointer values - Allow cancelling long running
Get-DbgProfilerStackFrameandShow-DbgProfilerStackTramevia Ctrl+C - Take assembly version into consideration in profiler when attempting to resolve a typeref to an assembly, in case multiple assemblies with the same name but different versions (without an exact match) are loaded into the target process
- Allow piping between all SOS data structure cmdlets
- Add parameters for easier filtering by name on SOS data structure cmdlets
- Add
-IncludeModuleparameter toShow-DbgProfilerStackTrace. Includes the module name in all displayed frames - Add
-Simpleparameter toShow-DbgProfilerStackTrace. Implies-Uniqueand-ExcludeNamespace - Improve error message displayed when profiler controller fails to connect to profiler named pipe
- Add
-WinDbgparameter toStart-DbgProfiler. Allows launching the target process under WinDbg - Don't attempt to create a new SOS process via
Disconnect-SOSProcessif no process is currently running - Remove profiler sessions terminated via
Stop-DbgProfilerand immediately initiate a GC to attempt to reclaim unused memory - Enhance
ProfilerSessionobject model to show its type and status more clearly - Add
-Rootsparameter toGet-DbgProfilerStackFrame. Exports the root frame that is normally displayed inShow-DbgProfilerStackFrame - Improve logic used to resolve Debugging Tools for Windows in
HostApp
Bugfixes
- Fix
ProfilerSessionincorrectly throwing an exception for ignoredPROFILER_HRESULTerrors - Fix profiler not considering
ELEMENT_TYPE_OBJECTwhen determining whether a recursive set of object references may be present - Fix unmanaged frames incorrectly being included in
Show-DbgProfilerStackTraceresults when searching for detailed frames that contain a certain value - Fix several race conditions in profiler when reading module info, thread ID and method info maps
- Fix profiler incorrectly handling structs with explicit layouts
- Fix profiler crashing when attempting to read a struct
ELEMENT_TYPE_VARwhen the canonical type has been returned due to information about the real generic type not being available - Fix ref return/ref fields not being parsed properly in profiler
- Fix
FrameFiltererincorrectly including-CalledFromframes before performing parameter/return value matching against the current frame - Fix
FrameFilterernot filtering-CalledFromcorrectly when the target frame is an unmanaged transition frame - Fix matched parameter/return values not being highlighted properly in
-CalledFrom - Don't highlight child frames under the target
-CalledFromframe when no filters specifically targeting those child frames have been specified - Fix profiler failing to properly resolve the
ClassIDof values of typeA<B<Var>>in some scenarios
DebugTools 0.1.0
Initial release