Re: Xcode debug follow fork
Re: Xcode debug follow fork
- Subject: Re: Xcode debug follow fork
- From: Greg Guerin <email@hidden>
- Date: Fri, 14 Nov 2008 13:13:10 -0700
Jim Ingham wrote:
Then go to terminal & start up your app. Go back to Xcode and if
the stars are correctly aligned, xcode should have attached to your
program early in its startup code. Then you can continue from there
and debug as you normally would.
One can also modify the app so it cooperates with debugging.
Early in the app's main(), look for a specific env-var, and if it's a
specific value, call pause(). This will cause the process to suspend
itself waiting for a specific signal. This should give plenty of
time to attach gdb, setup state, send signals, etc., before sending
the signal for the target process to resume.
See the man pages for getenv and pause.
-- GG
_______________________________________________
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