Re: Xcode debug follow fork
Re: Xcode debug follow fork
- Subject: Re: Xcode debug follow fork
- From: "Dee Ayy" <email@hidden>
- Date: Fri, 14 Nov 2008 14:59:36 -0600
On Fri, Nov 14, 2008 at 2:13 PM, Greg Guerin <email@hidden> wrote:
> 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
Thank you for these alternatives.
_______________________________________________
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