[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ddd question (gdb graphic front-end)
- To: Daniel Feiglin <dilogsys(at-nospam)inter.net.il>
- Subject: Re: ddd question (gdb graphic front-end)
- From: Gold Edward <avieal(at-nospam)inter.net.il>
- Date: Thu, 15 Nov 2001 21:57:37 +0200
- CC: Linux Israel <linux-il(at-nospam)linux.org.il>
- Delivered-To: linux.org.il-linux-il@linux.org.il
- References: <3BF2C5BE.CBF41E25@inter.net.il> <3BF3C935.4030800@inter.net.il>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
My problem was (and still is...) that I could not redirect the gdb
to the child process--though it's specificaly designed for that.
Maybe someone still can help about that.
The ddd front end even has a menu for this.
Eventually I did something very similar to what Daniel Feiglin
suggested,
but changing a working and tested code for debugging sake
(that's a porting assignment from Solaris to RH 7.1)--
it's not appropiate in the long run.
About Shaul Karl remark (cited bellow):
Because of it's specific nature we could not extract something
useful by employing dbx on the core file.
Anyway, thanks to all that answered.
Edy
Daniel Feiglin wrote:
> 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
> >
> >
> >
Shaul Karl wrote:
(2) Another way might be to examine the child core file.
=================================================================
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