|Apr 17, 2008, 09:43 AM||#1|
Xcode debugger and variable watch
I am using xcode to compile and debug my software. It's really comfortable to see variables with their contents in the debugger window, but;
let's say that I have a pointer double * P that points to an array of n doubles.
In the debugger window, when I click the small triangle next to P, I can only see the first item of this array, is there a easy/fast way to see the whole array.
In fact I wonder if there is a graphical way to do " (gdb) p P@n "
I have structures in arrays in structures with long names, so writing by hand in gdb console makes me lose time. It'll be very cool if I can do this with one click :-)
|May 9, 2008, 05:05 PM||#3|
I am not at my Mac and haven't used xcode for too much debugging, but have used GDB quite a bit. The way I would print a whole slew of things at contiguous positions in memory would be:
The second may only show you a few items if the array is very long. With the first you see 100 items, but you can increase that. The f means floating point, the g means "giant" for 8 bytes. At the gdb prompt you can type:
To get help with formatting the commands. You can use display/d to show values at every break point if that's what you want:
Last edited by lee1210; May 9, 2008 at 05:06 PM. Reason: your variable was uppercase, and i had written it in lowercase
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Property doesn't show up in XCode debugger||multinode||Mac Programming||1||Jun 23, 2013 08:47 AM|
|Check in xcode where is the value of a variable in memory||alexandre16||Mac Programming||27||Dec 2, 2012 01:59 PM|
|PHP debugger||3heap||Mac Applications and Mac App Store||0||Oct 25, 2012 10:28 AM|
|Viewing values in the debugger||KarlJay||iPhone/iPad Programming||19||Aug 9, 2012 06:26 PM|
|watching vars in debugger||KarlJay||iPhone/iPad Programming||0||Jul 11, 2012 11:57 AM|
All times are GMT -5. The time now is 02:08 PM.