-> ulimit -c unlinited
2. app 실행
-> ./test_task
3. App가 죽으면서 core.xxx 파일이 생성된다.
4. gdb 환경 설정
-> export LD_LIBRARYPATH=/mnt/nfs/arm/smshin/gdb_lib
5. 코어 파일을 디버깅 하는 방법
->arm-linux-gdb --core=core.238 --se=test_task
6. gdb에서 BackTrace하는 명령어
-> bt
7. 죽은 위치를 알 수 있다.
ex)
------------------------------------------------------------------------
# ../gdb-arm-linux -core=core.132 -se=nvs2200_web
GNU gdb 6.6
Copyright (C) 2006 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 "arm-linux"...
Using host libthread_db library "/lib/libthread_db.so.1".
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Core was generated by `./nvs2200_web'.
Program terminated with signal 11, Segmentation fault.
#0 0x400e5710 in _wordcopy_fwd_dest_aligned () from /lib/libc.so.6
(gdb) bt
#0 0x400e5710 in _wordcopy_fwd_dest_aligned () from /lib/libc.so.6
#1 0x400e5528 in memcpy () from /lib/libc.so.6
#2 0x0001370c in send_stream ()
#3 0x777b79e6 in ?? ()
Backtrace stopped: frame did not save the PC
(gdb) quit
'공부 이야기 > 컴퓨터 몽땅' 카테고리의 다른 글
| Cross-Compile DirectFB-1.0.0-rc2 Sequence (0) | 2008/02/13 |
|---|---|
| 네트워크 DVR의 현재와 미래 (0) | 2008/02/11 |
| gdb core dump debug 방법 (0) | 2008/01/23 |
| SIG32 with Linux and pthreads (gdbserver) (0) | 2008/01/22 |
| 스타일 시트 글꼴관련 (0) | 2008/01/22 |
| SourceInsight 환경 설정파일(UI관련) (4) | 2007/09/05 |





