Are there any easy ways to debug forked child processes in *nix, without having to sleep them and create new gdb instances, using ps to get the child’s pid? Are there any debuggers that do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can already do this using
gdb. Here is how:Then at some point you will reach your fork. Jump over it and
gdbshould inform you there is a new process.At this point you should view the “inferiors”
To switch to a different inferior, use
Hope this helps 🙂