GDB: 두 판 사이의 차이

내용 삭제됨 내용 추가됨
Peremen (토론 | 기여)
잔글 Gdb을(를) GDB(으)로 옮김: 모두 대문자로
Pastime (토론 | 기여)
GNU 디버거로 넘겨주기
1번째 줄:
#REDIRECT [[GNU 디버기]]
보통은 '''GDB'''라고 부르는 '''GNU 디버거'''는 [[GNU]] 소프트웨어 시스템을 위한 기본 [[디버거]]이다.
GDB는 다양한 Unix 기반의 시스템에서 동작하는 이식성있는 디버거로,
[[Ada]], [[C언어|C]], [[C++]], [[포트란]] 등의 여러 [[프로그래밍 언어]]를 지원한다.
 
== 역사 ==
GDB는 [[1988년]]에서 [[리처드 스톨만]]에 의해 최초로 작성되었으며,
[[GNU 일반 공중 사용 허가서]]하에 배포되는 [[자유 소프트웨어]]이다.
 
1990년에서 1993년에 걸쳐 시그너스 솔루션즈에서 근무하는 [[존 길모어]]에 의해 관리되었다.
 
== 기술적인 세부 사항 ==
'''TO DO'''
 
== 커맨드의 사용 예 ==
gdb prog.out prog.out 을 디버그 한다.
gdb > run 프로그램을 실행시킨다
 
== 예제 세션 ==
 
<pre>
GNU gdb Red Hat Linux (6.3.0.0-1.21rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".
 
(gdb) run
Starting program: /home/sam/programming/crash
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xc11000
This program will demonstrate gdb
 
Program received signal SIGSEGV, Segmentation fault.
0x08048428 in function_2 (x=24) at crash.c:22
22 return *y;
(gdb) edit
(gdb) shell gcc crash.c -o crash -gstabs+
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
warning: cannot close "shared object read from target memory": File in wrong format
`/home/sam/programming/crash' has changed; re-reading symbols.
Starting program: /home/sam/programming/crash
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xa3e000
This program will demonstrate gdb
24
Program exited normally.
(gdb) quit
</pre>
 
먼저 프로그램을 실행시키고 세그먼트 폴트의 원인을 찾은 후에 올바른 동작을 하도록 수정(edit)하였다.
수정된 프로그램은 [[GNU 컴파일러 모음|GCC]]를 통해 다시 컴파일된 후 실행되었다.
 
== 참고 문헌 ==
* [[리처드 스톨만|Richard M. Stallman]], [[Roland Pesch]], [[Stan Shebs]], et al., ''Debugging with GDB'' ([[자유 소프트웨어 재단]], 2002) ISBN 1-882114-88-4
 
== 바깥 고리 ==
*[http://www.gnu.org/software/gdb/ GDB 홈페이지]
*[http://sources.redhat.com/gdb/current/onlinedocs/gdb.html gdb 문서: "Debugging with GDB"] (html 과 400 페이지 이상의 PDF로 제공)
*[http://sources.redhat.com/gdb/current/onlinedocs/gdbint.html GDB Internals]
*[http://users.actcom.co.il/~choo/lupg/tutorials/debugging/debugging-with-gdb.html GDB 강좌]
*[http://kgdb.linsyssoft.com kgdb, 리눅스 커널을 디버깅하기 위한 gdb 백엔드]
*[http://www.dirac.org/linux/gdb Peter Jay Salzman's excellent GDB guide]
 
[[Category:디버거]]
[[Category:GNU 프로젝트 소프트웨어|디버거]]
 
[[cs:GNU Debugger]]
[[de:GNU Debugger]]
[[en:GNU Debugger]]
[[es:GNU Debugger]]
[[eo:GDB]]
[[eu:GNU Debugger]]
[[fr:GNU Debugger]]
[[he:GNU Debugger]]
[[pl:GNU Debugger]]
[[pt:GNU Debugger]]
[[ru:Gdb]]
[[sv:GNU Debugger]]
[[tr:GNU Debugger]]
[[zh:GNU 除錯器]]