Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rdlatimer

macrumors newbie
Original poster
Aug 8, 2014
2
0
I would like to view the entire contents of an array (1D) and matrix (2D) using the debugger in XCode - lldb.
I created these array/matrices using pointers and malloc(). The debugger shows the first element of the array/matrix, how do I view the entire contents of these arrays/matrices.
Thanks for any help.
 
I don't have a Mac in front of me at the moment to try it. But I know the 'gdb' command to dump the information. 'lldb' is probably similar.

Try:

PHP:
x/5i ptr

That would dump memory at pointer 'ptr' with 5 integers. You can replace the 5 with whatever count you want. You can replace the 'i' with other units like 'u' unsigned, 'x' hex, etc.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.