[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ddd question (gdb graphic front-end)
- To: Gold Edward <avieal(at-nospam)inter.net.il>
- Subject: Re: ddd question (gdb graphic front-end)
- From: Daniel Feiglin <dilogsys(at-nospam)inter.net.il>
- Date: Thu, 15 Nov 2001 15:55:01 +0200
- CC: Linux Israel <linux-il(at-nospam)linux.org.il>
- Delivered-To: linux.org.il-linux-il@linux.org.il
- Organization: Dilog Computers Ltd.
- References: <3BF2C5BE.CBF41E25@inter.net.il>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
- User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010628
What about something idiotic like this:
junk = fork();
if (junk < 0) {
// error
}
else if (junk > 0) {
// parent comes here
printf("Child pid = %d\n, junk);
}
else { // junk = 0; chil comes here
sleep(5); // sleep 5 seconds here
...
}
You could stick a getch() into the child instead of a sleep - depends
on what you are doing with the keyboard.
DAF
Gold Edward wrote:
> ddd is a graphic front end for gdb (and dbx and other debuggers).
> However, I haven't been able to redirect it to the child process,
> after a fork call. I need to redirect the debugger before the
> childs birth-- see the reason below .
> I've write "set follow fork-mode child" on the gdb panel of ddd,
> and also tried it through the ddd graphical means.
> Still, the debugger remains attached to the parent child.
> Someone know how to attach the gdb to the child process- BEFORE
> it's birth?
> (The child process dies soon after it's birth-- because of an access
> violation...).
>
>
> Thanks
> Edy
>
> =================================================================
> To unsubscribe, send mail to linux-il-request@linux.org.il with
> the word "unsubscribe" in the message body, e.g., run the command
> echo unsubscribe | mail linux-il-request@linux.org.il
>
>
>
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il