2

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?

1 Answers1

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.

Community
  • 1
  • 1
Paul R
  • 208,748
  • 37
  • 389
  • 560