Re: variable scope in gdb/xcode
Re: variable scope in gdb/xcode
- Subject: Re: variable scope in gdb/xcode
- From: Tony Romano <email@hidden>
- Date: Mon, 21 Jun 2010 13:40:12 -0700
My original post stated in the comments I cannot examine the the variable in the console using the po command and I gave the exact error message. If I haven't provided enough details, please say so in your reply. I am trying to respect the time of the people on the list.
The variable does not show up in the variables window and is not recognized my the command line. Which is consistent with the error message I listed below.
-Tony
On Jun 21, 2010, at 1:20 PM, Christiaan Hofman wrote:
>
> On Jun 21, 2010, at 22:17, Tony Romano wrote:
>
>> Still wondering how your reply helps... Of course I have a breakpoint there when I am issuing the command to gdb.
>>
>
> If you get to the breakpoint, you will get a the debug window (when you run with breakpoints on). In there you see an outline of local variables, one of them is bar. If you expand the item you can inspect it.
>
> If you don't ask detailed questions you should not expect detailed answers.
>
> Christiaan
>
>> On Jun 21, 2010, at 12:58 PM, Christiaan Hofman wrote:
>>
>>>
>>> On Jun 21, 2010, at 21:14, Tony Romano wrote:
>>>
>>>> Given this snippet:
>>>>
>>>> -(void) foo: (id) bar
>>>> {
>>>> ...
>>>> [receiver method:fn completionHandler:^(...)
>>>> {
>>>> // I use bar within scope no problems, but ...
>>>>
>>>> // try to examine bar in the block(po bar) and you get a message in the console that says
>>>> // No symbol "bar" in current context
>>>> }];
>>>>
>>>> ...
>>>>
>>>> }
>>>>
>>>> Can someone tell me what I need to do to examine the parameter bar in the block? Thanks.
>>>>
>>>> XCode 3.2.2/Snow 10.6.4
>>>>
>>>> -Tony
>>>
>>> Add a breakpoint somewhere inside the foo: method.
>>>
>>> Christiaan
>>>
>>>
>>
>> -Tony
>>
>
>
-Tony
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden