Re: Coded breakpoint
Re: Coded breakpoint
- Subject: Re: Coded breakpoint
- From: William Kitching <email@hidden>
- Date: Wed, 18 Mar 2009 01:52:50 +0000
That's for the info guys, much appreciated.
On 12 Mar 2009, at 01:34, Jim Ingham wrote:
Debugger and friends are a convenient way to do this.
Note, however, that even though it says so in the Tech Note, you
shouldn't assume that these calls do their magic by using a SIGINT.
All you can assume is that if USERBREAK is set, they will stop in
the debugger in a way that you can recover from, and if you aren't
running in the debugger, you'll probably crash...
In more recent OS'es these functions work by causing a trap, for
instance. So don't expect that inserting a SIGINT handler will
necessarily catch the exception that Debugger, etc, raise.
Jim
On Mar 11, 2009, at 6:25 PM, Ken Thomases wrote:
On Mar 11, 2009, at 7:46 PM, William Kitching wrote:
I want to write my own custom assert handlers and to do this I
need to trigger a breakpoint from the code. Is there a way to
trigger a coded stop/breakpoint in xcode?
The Debugging Magic technote <http://developer.apple.com/technotes/tn2004/tn2124.html#SECCORESERVICES
> says this:
Core Services includes a number of routines (for example,
Debugger, DebugStr, and SysBreak) that enter the debugger with a
message. If you set the USERBREAK environment variable to 1, these
routines will send a SIGINT signal to the current process, which
causes you to break into GDB. Xcode has GUI to enabled this
facility (the "Break on Debugger() and DebugStr()" checkbox in the
Debugging panel of the executable inspector [...]).
Cheers,
Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@apple.com
This email sent to email@hidden
_______________________________________________
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
___________________________________________________________
Try the all-new Yahoo! Mail. "The New Version is radically easier to use" The Wall Street Journal
http://uk.docs.yahoo.com/nowyoucan.html
_______________________________________________
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