0

How to print the address of array in memory in lldb ? I have tried to use command "e" with my array name but it gives me the content of the array and address of every element inside it. i'm using xcode9.2.

if i make a breakpoint on the array

Wholedata is an array of BaseModel

the array on the LLDB looks like this

when press on the quick look

and it doesn't give me the address.

and when type command "e" it looks like this

enter image description here

Bathant Hegazy
  • 549
  • 4
  • 16
  • In your second image: what's the difference between the highlighted array and that first array in the variable list that does show a memory address? – lundhjem May 11 '18 at 17:10

1 Answers1

0

Once you've breakpointed on your array, if you look in the Variables View (the pane left of the lldb Console) it shows the variable's memory address.

Array in Variables pane with memory address

Edit: Above was actually before it was initialized. When I use the "e" command it seems to work:

(lldb) e defKeys
(__NSArrayI *) $1 = 0x000000011bd18220 @"35 elements"

You should also be able to hover over the array name in the Editor, click the inspector eyeball to show its memory address.

Inspector popover

lundhjem
  • 608
  • 6
  • 12