I'm studying system-level programming. I have a little program that uses fork() to create a new child process. I set a breakpoint after the creation of the child process using GDB. Then, I ran it (through GDB).
With a new terminal window I check the processes id's using "ps -l -u my_username".
With another terminal window I enter GDB, and enter the command "attach child_pid". Still, no problem. I set a breakpoint. But then, when I do "n" inside that GDB session, in order to run/debug the child process,I keep getting the error :"Cannot find bounds of current function".
When I check again the processes PID's I notice that the child PPID changed to a different value than the Parent's original PID. I don't know if that's the problem.
Hope someone can help me. I'm new at this, but I definitely want to learn more, and use MAC OS to do it.
With a new terminal window I check the processes id's using "ps -l -u my_username".
With another terminal window I enter GDB, and enter the command "attach child_pid". Still, no problem. I set a breakpoint. But then, when I do "n" inside that GDB session, in order to run/debug the child process,I keep getting the error :"Cannot find bounds of current function".
When I check again the processes PID's I notice that the child PPID changed to a different value than the Parent's original PID. I don't know if that's the problem.
Hope someone can help me. I'm new at this, but I definitely want to learn more, and use MAC OS to do it.