Eclipse CDT에서 Fork 테스트하는 방법
프로그래밍???2011. 6. 9. 11:08
해석하기 귀찮아서... ㅡㅡ;
구글의 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.
'프로그래밍???' 카테고리의 다른 글
FIFO 사용에 대한 오류 및 문제 (0) | 2011.08.02 |
---|---|
mkdir -p 옵션 구현 (0) | 2011.06.17 |
Windows에서 localhost 도메인 이름 설정 (0) | 2011.03.29 |
객체지향 원칙 - Head First Design Pattern (0) | 2010.07.01 |
패턴 정리 - Head first Design Pattern (0) | 2010.07.01 |