Releases: lordmilko/DebugTools
DebugTools 0.3.0
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 nativedynamic
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 enhancedWPARAM
/LPARAM
analysis of a limited subset of message types.When monitoring messages that have the same
WPARAM
/LPARAM
meanings (e.g. inWM_MOUSEMOVE
andWM_LBUTTONDOWN
, theWPARAM
andWPARAM
areKeyModifiers
andX + 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 meaninglessWPARAM
/LPARAM
columns -
Add
Send-UiMessage
cmdlet (experimental): allows sending arbitrary window message values to a target process. Marshalling of customWPARAM
/LPARAM
structures is not yet implemented -
Add initial support for performing UI automation (experimental)
Improvements
- Add
-Synchronous
parameter 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-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
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
andGet-MethodDesc
cmdlets. Allows displaying information about the rawMethodTable
andMethodDesc
of a type in the current process - Allow reading raw
MethodTable
andMethodDesc
structures in a remote process by specifying-Raw
toGet-SOSMethodTable
andGet-SOSMethodDesc
respectively - Add
Import-DbgProfilerStackTrace
andExport-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
toStart-DbgProfiler
to prevent the profiler from attempting to read pointer values - Allow cancelling long running
Get-DbgProfilerStackFrame
andShow-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 toShow-DbgProfilerStackTrace
. Includes the module name in all displayed frames - Add
-Simple
parameter toShow-DbgProfilerStackTrace
. Implies-Unique
and-ExcludeNamespace
- Improve error message displayed when profiler controller fails to connect to profiler named pipe
- Add
-WinDbg
parameter toStart-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 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
ProfilerSession
incorrectly throwing an exception for ignoredPROFILER_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 typeA<B<Var>>
in some scenarios
DebugTools 0.1.0
Initial release