O'Reilly logo

Windows Debugging Notebook: Essential User Space WinDbg Commands by Dmitry Vostokov, Roberto Alexis Farah

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

~*

When debugging, most of the time, if not all the time, we have to see all stacks for all threads or set the context for a specific thread in order to analyze it. To do that we use the ~ command and according to the WinDbg documentation we have these variants:

Thread identifierDescription
~.Identifies the current thread
~#Identifies the thread that caused the current debug event or exception
~*Identifies all threads in the process
~NumberIdentifies the Number thread
~~[TID]Identifies the thread with TID (Thread ID)

This command is very easy to use, but it has some nuances. Note that the s after the thread number, in examples below, forces the debugger to change the thread context. In other words, all k* commands are going to operate on the new ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required