I need the size of a variable and I want that value from Windbg command line. It's hard and useless to compile the code and add a C++ sizeof() only to get that value.
From documentation I see that Windbg can filter after value dt /s
. but displayng that value ?
I use the dt command on the data type and then it’s easy see the layout and size.
0:000> dt CRect
CrashTestD!CRect
+0x000 left : Int4B
+0x004 top : Int4B
+0x008 right : Int4B
+0x00c bottom : Int4B
0:000> dt long
Int4B
Or use the C++ evaluator
0:000> ?? sizeof(CRect)
unsigned int 0x10
0:000> ?? sizeof(Float)
unsigned int 4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With