LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   How to debug a child process? (http://www.linuxquestions.org/questions/programming-9/how-to-debug-a-child-process-89552/)

koyi 09-05-2003 08:54 AM

How to debug a child process?
 
I am trying to debug a child process after a fork() with ddd. I followed the instruction on this page: http://www.cs.toronto.edu/~maclean/c...-children.html but to no avail. Could somebody give me any ideas? I don't mind doing some reading. Thanks. :)

Bebo 09-09-2003 10:07 AM

Are ptrace, strace and/or ltrace to some use? Don't know anything about them really, but anyway...just a thought.

shishir 09-09-2003 03:33 PM

it works for me....tried it both on red hat and SuSE..
and there is no reason for it not to work....the info page of gdb says that this is the procedure to debug a child process....

could you perhaps post the code you were trying to debug..?

koyi 09-11-2003 05:23 AM

Thanks for your replies. I have debugged the program oredi myself. The bug wasn't in the child process... :P But of course the information is still useful for future debug sessions. Thanks. I will try it when I need to debug a child process again. :)


All times are GMT -5. The time now is 07:52 PM.