I have a pointer to a buffer containing multiple doubles. Can I use Xcode or lldb to view the values of the doubles stored in the buffer?
Asked
Active
Viewed 925 times
1 Answers
1
If you switch to gdb rather than lldb it's much easier to print out the contents of arrays, e.g. in the console:
(gdb) p *my_double_ptr@16
If my_double_ptr
is a pointer to double then the above command will print the first 16 doubles at the address pointed to by my_double_ptr
.
You can do this with lldb also but it's much less straightforward - see this question on SO: LLDB equivalent of GDB's '@' operator in Xcode 4.1.