Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Why doesn't the VS2005 debugger show the actual 'this' address?

$
0
0

I'm using VS2005 debugger and noticed something I wasn't expecting and was hoping there was a simple answer: (I know: upgrade ... unfortunately stuck with it and can't...)

I have a function where I'm dumping the address for debug tracking:

int myclass::myfunction()
{
    myclass *pThis = this;
    TRACE("inside myfunction - this=0x%08x, pthis=0x%08x\n",this,pThis);
    ...
}


The trace output shows that pThis=this (in this case both=0x0e23ff90), but if I hover the mouse over the two, pThis=0x0e23ff90 and this=0x0e23fff0! (The debugger expands both to show the same data.)

Can someone tell me why the debugger shows 'this' as 0x0060 higher than it really is?

Thanks!



DanWoerner


Viewing all articles
Browse latest Browse all 15302

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>