Skip to content

Releases: lordmilko/DebugTools

DebugTools 0.3.0

23 Dec 23:59
Compare
Choose a tag to compare

New Features

  • Add Get-DbgProxy cmdlet (experimental): creates a proxy around an object contained in another process, and allows interacting with it as if it were a native dynamic object! Very cool

  • Add Get-PEHeader cmdlet. Emits the in-memory PE Header based on a specified process + module name

  • Add Get-DbgStaticField cmdlet. 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-UiMessage cmdlet (experimental): allows monitoring the window messages of a target process (similar to Spy++). Currently only provides enhanced WPARAM / LPARAM analysis of a limited subset of message types.

    When monitoring messages that have the same WPARAM / LPARAM meanings (e.g. in WM_MOUSEMOVE and WM_LBUTTONDOWN, the WPARAM and WPARAM are KeyModifiers and X + Y respectively) Get-UiMessage will 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 meaningless WPARAM / LPARAM columns

  • Add Send-UiMessage cmdlet (experimental): allows sending arbitrary window message values to a target process. Marshalling of custom WPARAM / LPARAM structures is not yet implemented

  • Add initial support for performing UI automation (experimental)

Improvements

  • Add -Synchronous parameter to Start-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-DbgStaticField will 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

01 Apr 03:20
Compare
Choose a tag to compare

New Features

  • Add Get-DbgProfilerStaticField cmdlet. Allows reading the values of static fields. Due to limitations of the CLR, currently only allows reading primitive values + strings
  • Add Get-MethodTable and Get-MethodDesc cmdlets. Allows displaying information about the raw MethodTable and MethodDesc of a type in the current process
  • Allow reading raw MethodTable and MethodDesc structures in a remote process by specifying -Raw to Get-SOSMethodTable and Get-SOSMethodDesc respectively
  • Add Import-DbgProfilerStackTrace and Export-DbgProfilerStackTrace cmdlets. Allows importing/exporting traces to files

Improvements

  • Prevent ProfilerSession from 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 -IgnorePointerValue to Start-DbgProfiler to prevent the profiler from attempting to read pointer values
  • Allow cancelling long running Get-DbgProfilerStackFrame and Show-DbgProfilerStackTrame via 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 -IncludeModule parameter to Show-DbgProfilerStackTrace. Includes the module name in all displayed frames
  • Add -Simple parameter to Show-DbgProfilerStackTrace. Implies -Unique and -ExcludeNamespace
  • Improve error message displayed when profiler controller fails to connect to profiler named pipe
  • Add -WinDbg parameter to Start-DbgProfiler. Allows launching the target process under WinDbg
  • Don't attempt to create a new SOS process via Disconnect-SOSProcess if no process is currently running
  • Remove profiler sessions terminated via Stop-DbgProfiler and immediately initiate a GC to attempt to reclaim unused memory
  • Enhance ProfilerSession object model to show its type and status more clearly
  • Add -Roots parameter to Get-DbgProfilerStackFrame. Exports the root frame that is normally displayed in Show-DbgProfilerStackFrame
  • Improve logic used to resolve Debugging Tools for Windows in HostApp

Bugfixes

  • Fix ProfilerSession incorrectly throwing an exception for ignored PROFILER_HRESULT errors
  • Fix profiler not considering ELEMENT_TYPE_OBJECT when determining whether a recursive set of object references may be present
  • Fix unmanaged frames incorrectly being included in Show-DbgProfilerStackTrace results 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_VAR when 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 FrameFilterer incorrectly including -CalledFrom frames before performing parameter/return value matching against the current frame
  • Fix FrameFilterer not filtering -CalledFrom correctly 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 -CalledFrom frame when no filters specifically targeting those child frames have been specified
  • Fix profiler failing to properly resolve the ClassID of values of type A<B<Var>> in some scenarios

DebugTools 0.1.0

19 Mar 04:13
Compare
Choose a tag to compare

Initial release