• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Xcode 2.5/Leopard / -fobj-exceptions No Symbolic Breakpoints?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode 2.5/Leopard / -fobj-exceptions No Symbolic Breakpoints?


  • Subject: Re: Xcode 2.5/Leopard / -fobj-exceptions No Symbolic Breakpoints?
  • From: Chris Hanson <email@hidden>
  • Date: Wed, 13 Feb 2008 17:48:36 -0800

On Feb 13, 2008, at 4:12 PM, Keary Suska wrote:

I ran into a problem where it appears that I can't break on symbolic
breakpoints.

On which version of Mac OS X and Xcode? This is critical information, particularly for your question.


I had an out-of-bounds exception being raised on an NSArray
-objectAtIndex call. I tried to find out where it was using a symbolic
breakpoint -[NSException raise], but it never triggered.

Two things.

One, there's a separate funnel for exceptions that are raised via @throw on Tiger and Panther, the function objc_exception_throw, which is now used for all exceptions on Leopard. Set a symbolic breakpoint on that and see if it's hit.

Two, just "run" won't cause the Xcode debugger to come up when a breakpoint is hit. You need to "debug" your application for it to actually be brought up under the debugger. With Xcode 3.0, there's a breakpoint enable/disable button in the toolbar you can use to quickly and easily change how Xcode is running your application.

Is there some way to get this to work? Does it have something to do with
using -fobj-exeptions? Or that I am using multiple threads? I couldn't find
any info on this...

What did you try? Using Google to search for "break Objective-C exceptions" (without the quotes) returns a lot of hits.


The canonical strategy for breaking on Objective-C exceptions is to:

(1) Make sure you're running your program under the debugger.
(2) Set a symbolic breakpoint on the function objc_exception_throw.
(3) If you're running on Tiger or Panther, set a symbolic breakpoint on the method -[NSException raise]. This step is unneeded on Leopard, as objc_exception_throw is always invoked.


  -- Chris

_______________________________________________
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


  • Follow-Ups:
    • Re: Xcode 2.5/Leopard / -fobj-exceptions No Symbolic Breakpoints?
      • From: Keary Suska <email@hidden>
References: 
 >Xcode 2.5/Leopard / -fobj-exceptions No Symbolic Breakpoints? (From: Keary Suska <email@hidden>)

  • Prev by Date: Basic use questions
  • Next by Date: Re: Xcode 2.5, ppc, link errors
  • Previous by thread: Xcode 2.5/Leopard / -fobj-exceptions No Symbolic Breakpoints?
  • Next by thread: Re: Xcode 2.5/Leopard / -fobj-exceptions No Symbolic Breakpoints?
  • Index(es):
    • Date
    • Thread