흐르는 시간의 블로그...


해석하기 귀찮아서... ㅡㅡ;

구글의 index 저장에 남아 있고 본 링크에는 남아 있지 않음...

Make a "C++ Attach to Application" debug configuration. Start your program using
your normal debug configuration. After the fork occurs, select the "Attach to
Application" fro, the debug icon. A dialog box with all of the running processes
should appear. Choose the process you want to debug and it should appear in the
"Debug" control panel.

There is a tutorial that shows a video conference, somewhere, that explains the

process and goes through an example. I was able to get it to work for me.

--------------------------------------------------------------------------------------------

For debugging a child process on Linux, gdb has the ability to step into a child process after fork and exec. This behavior can be enabled with the follow-fork-mode child statement.

Put the statement

set follow-fork-mode child

in the .gdbinit file, located in the project work directory.
Now, setting some breakpoints in the code of the child process will cause gdb to halt execution.

Btw, I’ve looked for a corresponding GUI option in the debug dialog (CDT version 4.0.3), but I found none. So it seems that creating a .gdbinit file is currently the only solution for this.