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:58:37 -0600
On Fri, Nov 14, 2008 at 12:29 PM, Jim Ingham <email@hidden> wrote:
> You WOULD set "follow fork" by opening the Debugger console and typing "set
> follow-fork-mode child" IF this were supported in our version of gdb. But
> it is not (some kernel support we need to implement "follow fork" is not
> present in the Mach OS X kernel...)
Oh, BTW, I'm on the latest Tiger 10.4.11? and Xcode is at 2.5.
That debugger console must have escaped me. I typed in what looked
like a console where it shows gdb output, but nothing happened (as far
as I know). So I tried "show follow-fork-mode", I think, and also no
response. So I figured I was not in the debugger console.
> If you don't mind attaching to your program after it has started up all the
> way and is sitting in its event loop, they you can run your command line,
> and then switch back to Xcode and use the Run->Attach To Process submenu you
> should see your process, and you can just attach to it.
Yeah, I saw that menu item, but I need to attach earlier like you said below.
> If you need to attach to your process earlier than that, you can use gdb's
> "attach -waitfor" command which will get the debugger to cycle waiting for a
> process of a given name to show up, and when it does, to attach to it right
> away.
>
> To use that in Xcode, open your Xcode project, edit the "active executable"
> (in Project->Edit Active Executable) switch to the Debugging tab, and
> uncheck "Start executable after starting debugger". Then start the Xcode
> debugger. Xcode will load your program into the debugger, but won't try to
> run it. So then you can open the Console (Run->Console) and type:
>
> (gdb) attach -waitfor my_app
>
> 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.
>
> Jim
Thanks. I'll try that.
_______________________________________________
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