[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ddd question (gdb graphic front-end)



another problem with attaching to a child process can be:
until the process is born it has no PID ..
and to predict a PID may not be possible.


-=O0~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~O0=-
"Beware the Jabberwock, my son!
 The jaws that bite, the claws that catch!
 Beware the Jubjub bird, and shun
 The frumious Bandersnatch!"

                       [L.Carrol "Jabberwacky"]

On Thu, 15 Nov 2001, Shaul Karl 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...).
> >
>
>
> (1) One way to debug the child is to make it sleep immediately after it
> is forked. This will give you sufficient time to find its pid and have
> gdb attached to it.
> (2) Another way might be to examine the child core file.
>
>
> >
> > 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
>     email: shaulka (replace these parenthesis with @) bezeqint,
>            delete the comma and the white space characters and add .net
>
>
>
> =================================================================
> 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