![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Game engine designer
Join Date: May 2005
Location: Sweden
Posts: 301
Rep Power: 4
![]() |
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
__________________
http://www.klarre.se |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Game engine designer
Join Date: May 2005
Location: Sweden
Posts: 301
Rep Power: 4
![]() |
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()); 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".
__________________
http://www.klarre.se |
|
|
|
|
|
#4 | ||
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Re: Watch the float stack
Quote:
Quote:
![]()
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
||
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Heap vs. Stack memory | Eric the Red | C++ | 11 | Oct 24th, 2006 6:18 PM |
| stack question | bl00dninja | C++ | 9 | May 8th, 2006 7:54 PM |
| Don't read if you watch baseball | uman | Coder's Corner Lounge | 31 | Aug 10th, 2005 7:03 AM |
| Smashing a stack in MIPS assembly code | tsgrimey | Assembly | 2 | Feb 27th, 2005 1:06 PM |
| Help with stack implementation | ridley | C++ | 0 | Feb 26th, 2005 2:26 AM |