Re: Help! program runs differently under debug than not
Re: Help! program runs differently under debug than not
- Subject: Re: Help! program runs differently under debug than not
- From: Eric Albert <email@hidden>
- Date: Wed, 21 Jun 2006 15:43:50 -0700
On Jun 21, 2006, at 3:31 PM, Rick Mann wrote:
On Jun 21, 2006, at 15:26 , Eric Albert wrote:
Someone described this earlier, but I'll try to make it a bit more
clear. In the child, do something like this:
int main(void) {
static int foo = 0;
while (foo == 0) {
sleep(1);
}
...
}
That'll cause the child to spin on startup. Attach with gdb, type
'p (foo = 1)' at the gdb prompt, and then go from there.
Yeah, it's more complicated than that. I basically have to do that
in the child AND the parent, because the parent will time out in
the time it takes me to do all that for the child. (Also, keep in
mind that the child begins to execute on the return from fork(),
not at main).
Ah...I figured you were doing a fork and exec, not a fork.
If I do go to all this trouble, will I get to debug the child in
the GUI debugger, or will I have to do everything from the gdb
command line?
I'm not sure...I don't use the GUI debugger. :)
-Eric
_______________________________________________
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