Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Viewing member variable

823 views
Skip to first unread message

MarkS

unread,
Oct 28, 2008, 10:28:00 AM10/28/08
to
Hi,
I can view thread local variables, but how can I view member variables?

I used adplus to generate a dump which I've loaded into windbg. I have
private pdb symbols correctly loaded. I can use .frame 5 to go back up the
stack and then use ? and db and dt commands to view local thread types.
But I'm stuck when trying to find a private member variable m_sqlclient.

I'm still a relative newbie here.
Many thanks,
Mark.

MarkS

unread,
Oct 28, 2008, 10:52:00 AM10/28/08
to
"MarkS" wrote:
> Hi,
> I can view thread local variables, but how can I view member variables?


I've solved my own question by doing the following commands:
0:000> ? this
Evaluate expression: 1239460 = 0012e9a4
0:000> dd 12e9a4 L1
0012e9a4 0032a848
0:000> dt CSqlCommsClient 32a848

Great, I never knew I could use ? this
Wonderful! Thanks everyone. If anyone else can add to this, please do.

Marc Sherman

unread,
Oct 28, 2008, 4:26:02 PM10/28/08
to

"MarkS" <Ma...@discussions.microsoft.com> wrote in message
news:F4CC214E-1AD0-4582...@microsoft.com...

try `dt this.` // note the trailing dot

or `dt -r this`

MarkS

unread,
Oct 28, 2008, 6:28:01 PM10/28/08
to
"Marc Sherman" wrote:
> try `dt this.` // note the trailing dot
> or `dt -r this`

What's the purpose of the trailing dot? It didnt work for me.
It does work without the dot.
And the -r switch is great!

thanks!

Marc Sherman

unread,
Oct 29, 2008, 9:57:51 AM10/29/08
to
"MarkS" <Ma...@discussions.microsoft.com> wrote in message
news:7CA112F4-EBCA-48DA...@microsoft.com...

> "Marc Sherman" wrote:
>> try `dt this.` // note the trailing dot
>> or `dt -r this`
>
> What's the purpose of the trailing dot? It didnt work for me.

It tells the debugger to show the fields of a struct/class. It might not be
working because `this` is the address of a pointer.

> It does work without the dot.
> And the -r switch is great!
>
> thanks!

you're welcome


Paul Arnold

unread,
Oct 31, 2008, 6:24:13 AM10/31/08
to
On Oct 28, 2:28 pm, MarkS <Ma...@discussions.microsoft.com> wrote:
> But I'm stuck when trying to find a private member variable m_sqlclient.

I rather like the ??@@c++(this->m_sqlclient) syntax. You can also put
other valid C++ expressions in the parenthesis which can be very
useful.

Paul

0 new messages