0
NSArray *arr=[[NSArray alloc]initWithObjects:@"A",@"AA",nil];

I set breakpoint then if I fire command po &arr; on lldb then i get address of arr variable i want also find address of @"A" object and @"AA" object How can I find

1
  • With the new syntax you could write NSArray* arr= @[ @"A",@"AA" ]; Commented Feb 19, 2013 at 13:11

2 Answers 2

1

Something like this:

// This will print pointer values
print arr[0]
print arr
print &arr
// This will print object values
po arr
po arr[0]
Sign up to request clarification or add additional context in comments.

2 Comments

error: address of property expression requested error: 1 errors parsing expression
Try with [arr objectAtIndex: 0] instead of arr[0]. arr[0] works for newer versions.
0

If you are on 4.6 or later, you could try "frame variable arr[0]". It will not work on earlier versions, because it is based on synthetic children being provided for NSArray, which is >= 4.6 only

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.