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

dt

This command is used almost all the time whenever we need to get the fields and type for a structure or a class. For example, we may have a this pointer and use dt to get its fields and type. It is a simple command with interesting variations that we should be aware of, because it's an important armory when hunting nasty bugs.

The simplest dt form displays a type without using instance information. In other words, we don't need to provide the address where the object is located, just its type, for example:

0:015> dt  CBallThread mtgdi!CBallThread +0x000 __VFN_table : Ptr32 =00400000 classCObject : CRuntimeClass =00400000 classCCmdTarget : CRuntimeClass =00400000 _commandEntries : [0] AFX_OLECMDMAP_ENTRY =00400000 commandMap : AFX_OLECMDMAP ...

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