#13720 - beetlefeet - Sun Dec 21, 2003 3:39 pm
Is there a good way to find particular variables values in VBA's Memory Viewer?
I've got a couple coordinates in a couple structs that I'd like to keep an eye on.
What addresses should I start looking for standard variables at?
Thanks in advance.
#13721 - poslundc - Sun Dec 21, 2003 4:13 pm
Well, I doubt it's the best way, but if you're not using EWRAM for anything then you can just store a pointer to your variable at the beginning of EWRAM (0x02000000). Code would probably look something like this:
*(unsigned int *)(0x02000000) = (unsigned int)(&myVar);
You can repeat the process at 0x02000004, 0x02000008, etc. for other variables as well if you want.
Then just look in VBA's memory viewer at the start of EWRAM, at the number(s) listed there will be the addresses of the variables you want to check up on.
(Your variables should be in the 0x0300XXXX range, by the way.)
Dan.
#13726 - Touchstone - Sun Dec 21, 2003 4:53 pm
If you _are_ using EWRAM but like poslundc's idea you could look up the location of all global variables by browsing the map file generated by the GCC linker.
_________________
You can't beat our meat
#13754 - beetlefeet - Mon Dec 22, 2003 6:55 am
Thanks heaps both of you.
Poslundc's way is perfect.
seems i'm decremementing a variable all the way around to FFFFFFFF, so know I know much better where to look to debug.
Thanks again!