Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   Watch the float stack (http://www.programmingforums.org/showthread.php?t=14432)

Klarre Nov 13th, 2007 3:02 AM

Watch the float stack
 
Do anyone know if there is a way to "watch" the float stack in Visual Studio? It is very handy to add watches like "eax" to see return values after function calles. But is there a way to do the same thing with floats by seeing the float stack while debugging?

Thanks for your help!

/Klarre

DaWei Nov 13th, 2007 8:49 AM

Re: Watch the float stack
 
A float is just another binary value. Find out what register(s) you're interested in and have a look. You can also watch the associated variable, of course.

The "return" register is just a convention. Don't expect it to be the same on every platform.

Klarre Nov 13th, 2007 4:42 PM

Re: Watch the float stack
 
I am not sure you really got what I meant, or I did not understand your first two sentences of your post. The thing with seeing the FPU stack in the watch panel is because sometimes you don't see the associated variable. See example below.
:

return static_cast<float>(a * b / getFloatFromSomeWhere());
Here it is nice to see what has been put on the FPU stack to see what the functions has returned.

Thanks for your reply though!

Anyway...
I solved the problem. Opening the "Registers" tab and right-click on it will give me a list of registers to display. It was also possible to add a watch named like "st0".

DaWei Nov 13th, 2007 5:06 PM

Re: Watch the float stack
 
Quote:

Opening the "Registers" tab and right-click on it will give me a list of registers to display.
That sort of goes along with
Quote:

Find out what register(s) you're interested in and have a look.
;)


All times are GMT -5. The time now is 3:34 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC