A Remote Debugging Scheme for Multi-process Applications in Linux Environments

리눅스 환경에서의 다중 프로세스 응용에 대한 원격 디버깅 기법

  • 심현철 (성균관대학교 정보통신공학부) ;
  • 강용혁 (성균관대학교 정보통신공학부) ;
  • 엄영익 (성균관대학교 정보통신공학부)
  • Published : 2002.12.01

Abstract

Debugging for application Programs running in embedded Linux systems has mostly been done remotely due to the limited resources of the target systems. The gdb, which is one of the most famous debugger in Linux systems, does not support the debugging of the child processes which is created by the fork system call in local and remote environments. Therefore, by using gdb, developers can debug the application programs that have single-process structure in local and remote environments, but they cannot debug the application programs that have multi-process structures by using gdb in remote environments. Also, although developers can debug the application programs that have multi-process structures by using gdb in local environments, it needs additional and unnecessary codings. In this paper, we presents the remote debugging scheme that can be used for debugging multi-process structured applications. The proposed scheme is implemented by using the library wrapping scheme, and also uses the conventional system components such as gdb and gdbserver.

리눅스 기반의 임베디드 시스템에서 동작하는 응용 프로그램의 디버깅은 타겟 시스템의 제한된 자원으로 인하여 대부분 원격으로 이루어진다. 리눅스 기반의 시스템에서 동작하는 gdb는 원격에서 또는 로컬에서 디버깅 중인 프로세스가 fork 시스템 콜 호출 시 새로이 생성된 프로세스를 디버깅할 수 있도록 지원하지 않는다. 이에 따라, 리눅스 환경에서 동작하는 gdb와 gdbserver를 사용해서 단일 프로세스 구조를 갖는 옹용 프로그램을 원격 또는 로컬 디버깅할 수는 있으나 다중 프로세스 구조의 옹용 프로그램을 원격으로 디버깅할 수는 없다. 또한 로컬에서 gdb를 사용하여 다중 프로세스 구조의 응용 프로그램을 디버깅할 수는 있지만 이를 위해서는 개발자비 부가적인 코딩이 필요하다. 본 논문에서는 리눅스 커널의 변경 없이 라이브러리 래핑(wrapping) 방법을 이용하여 원격 시스템에서 동작하는 다중 프로세스 구조의 응용 프로그램을 gdb와 gdbserver를 사용하여 디버깅하는 방법을 제시한다.

Keywords

References

  1. Richard M. Stallman, Debugging with GDB, 4th ed., Cygnus Support, 1996
  2. 임형택, 심현철, 손승우, 김흥남, 김채규, 'Q+P Esto의 원격 개발을 지원하는 타겟에이전트', 한국정보처리학회 2001년 추계 학술대회, 제 8권, 제 2호, pp. 671-674, 2001
  3. Etnus, Totalview Getting Started, http://www.etnus.com/Products/TotalView/started/getting_started2.html, 2001
  4. Nathan Field, Debugging Embedded Linux Application, http://embedded.linuxjournal.com/magazine/issue06/4897/?sid=17, November, 2001
  5. Intel, Intel Atchitecture Software Developer's Manual, Vol. 3, 1999
  6. Daniel P. Bovet and Marco Cesati, Understanding the Linux Kernel, O'Reilly, 2001
  7. Uresh Vahalia, Unix Internals, Prentice Hall, 1996
  8. Greg Rose, Embedded Linux 101, http://www.ecnmag.com/ecnmag/issues/2001/12012001/ec1dsc100_.asp, 2001
  9. Sun Microsystems Inc., Linker & Libraries Guide, October, 1998