Re: Symbolic Breakpoints
Re: Symbolic Breakpoints
- Subject: Re: Symbolic Breakpoints
- From: Quincey Morris <email@hidden>
- Date: Wed, 21 Sep 2011 11:10:43 -0700
On Sep 21, 2011, at 09:29 , Richard Somers wrote:
> That works! So apparently the entire symbol including square brackets and the initial plus or minus indicating instance method versus class method is required for an Objective-C symbolic breakpoint.
>
> The Xcode 4 User Guide explicitly states
>
> You can specify the symbol as:
>
> A method name. For example, pathsMatchingExtensions:.
>
> A method of a particular class. For example, [SKTLine drawHandlesInView], people::Person::name().
>
> A function name. For example, _objc_msgForward.
>
>
> So the documentation is apparently wrong or Xcode 4.1 has not caught up to the documentation. After testing various symbols this is what I found.
>
> LLDB
> keyDown: NOTHING
> [MyView keyDown:] NOTHING
> -[MyView keyDown:] WORKS
>
> GDB
> keyDown: CRASH
> [MyView keyDown:] WORKS
> -[MyView keyDown:] WORKS
I'm not seeing this behavior in gdb (with Xcode 4.2).
In Xcode 3, if you tried to set a breakpoint on (say) 'keyDown:', Xcode would pop up a sheet listing all the different matching symbols (all the methods in the various classes where 'keyDown:' was defined). You could check any combination, and there was a Set All button to check them all.
In Xcode 4, I just tried setting a breakpoint on 'keyDown:' -- just that with no additional punctuation or qualification. If the app isn't running yet, the symbolic breakpoint is just added to the list but isn't resolved yet. When the application runs, I get a set of nested breakpoints, one for each of the definitions, and I can enable or disable each individually. The app does stop at any of the enabled sub-breakpoints.
In Xcode 4, I tried setting the same symbolic breakpoint and then running with lldb. This time the breakpoint didn't multi-resolve upon running, and the app didn't stop when a key was pressed.
So, it seems like symbolic resolution isn't finished in lldb yet, and there's something else going on your project that's causing the gdb crash.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden