1

1

I can't see the value of the pointer array in the debugging window as pictured. I have to go down to the main function to see the array values. Is there a way to see the array values ​​in the function?

vimuth
  • 5,064
  • 33
  • 79
  • 116
jjjooo
  • 15
  • 4

1 Answers1

0

As noted in https://stackoverflow.com/a/26303375/1271826, you can use parray at the (lldb) prompt:

(lldb) parray 50 arr
(int *) $36 = 0x00007ff7bfeff280 {
  (int) [0] = 5
  (int) [1] = 10
  (int) [2] = 1
  (int) [3] = 4
  (int) [4] = 3
  (int) [5] = 7
  ...

Or you can manually add an expression *(int(*)[50])arr in the “variables view”:

enter image description here

Probably needless to say, but you can also p *(int(*)[50])arr at the (lldb) prompt.

Rob
  • 415,655
  • 72
  • 787
  • 1,044