gamer_rags
gamer_rags

Reputation: 134

WinDbg: Regarding output of dt command

When I dump the details of a local variable using the dt command in WinDbg i get the following output:

0:000> dt uid_out
Local var @ 0x84ebbac Type CString*
0x084ebbfc 
   +0x000 m_pchData        : 0x082f2988  -> 0x31

My query is what does -> 0x31 in the final line specify? Does it specifies the size of the CString?

Thanks in advance!

Upvotes: 1

Views: 1806

Answers (2)

Steve Johnson
Steve Johnson

Reputation: 3027

This is the value of the first element of the array pointed to by a pointer type. Since m_pchData is a pointer to CHAR, the debugger shows you the first CHAR value at address 0x82f2988.

Upvotes: 1

snoone
snoone

Reputation: 5499

My query is what does -> 0x31 in the final line specify? Does it specifies the size of the CString?

It's not being that smart, I suspect it's just the first byte of the pointer contents. You can confirm with:

dc 0x082f2988  

Upvotes: 1

Related Questions