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 [EMAIL PROTECTED] with > > the word "unsubscribe" in the message body, e.g., run the command > > echo unsubscribe | mail [EMAIL PROTECTED] > > > > > > Shaul Karl wrote: (2) Another way might be to examine the child core file. ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]