1. coredump 한계 최대로 설정
-> ulimit -c unlinited
2. 확인하고자 하는 프로그램 실행
-> ./Phaethon
3. 프로그램이 죽으면 core.???? 파일이 생성된다.
4. gdb 환경 설정
-> export LD_LIBRARYPATH=/mnt/nfs/arm/smshin/gdb_lib
5. 코어 파일을 디버깅 하는 방법
->gdb -core=core.5884 -se=test_task
6. BackTrace
-> bt
ex)
-> ulimit -c unlinited
2. 확인하고자 하는 프로그램 실행
-> ./Phaethon
3. 프로그램이 죽으면 core.???? 파일이 생성된다.
4. gdb 환경 설정
-> export LD_LIBRARYPATH=/mnt/nfs/arm/smshin/gdb_lib
5. 코어 파일을 디버깅 하는 방법
->gdb -core=core.5884 -se=test_task
6. BackTrace
-> bt
ex)
rogman@lutop:~/src/embedded/bin/Phaethon$ gdb -core=core.5884 -se=Phaethon
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...done.
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/tls/i686/cmov/libm.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Core was generated by `./Phaethon'.
Program terminated with signal 6, Aborted.
[New process 5884]
[New process 6660]
[New process 5889]
[New process 5888]
[New process 5887]
[New process 5886]
[New process 5885]
#0 0xb7f55410 in __kernel_vsyscall ()
(gdb) bt
#0 0xb7f55410 in __kernel_vsyscall ()
#1 0xb7cdd085 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7cdea01 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0xb7d15b7c in ?? () from /lib/tls/i686/cmov/libc.so.6
#4 0xb7d1da85 in ?? () from /lib/tls/i686/cmov/libc.so.6
#5 0xb7d214f0 in free () from /lib/tls/i686/cmov/libc.so.6
#6 0xb7ee9b11 in operator delete () from /usr/lib/libstdc++.so.6
#7 0x0805a1d4 in cppalgo::DoubleList<CSessionThread*>::DeleteAt ()
#8 0x080598ad in CSessionManager::clearAll ()
#9 0x0805364a in CAppManager::startApplication ()
#10 0x0805c267 in main ()
(gdb)
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...done.
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/tls/i686/cmov/libm.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Core was generated by `./Phaethon'.
Program terminated with signal 6, Aborted.
[New process 5884]
[New process 6660]
[New process 5889]
[New process 5888]
[New process 5887]
[New process 5886]
[New process 5885]
#0 0xb7f55410 in __kernel_vsyscall ()
(gdb) bt
#0 0xb7f55410 in __kernel_vsyscall ()
#1 0xb7cdd085 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7cdea01 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0xb7d15b7c in ?? () from /lib/tls/i686/cmov/libc.so.6
#4 0xb7d1da85 in ?? () from /lib/tls/i686/cmov/libc.so.6
#5 0xb7d214f0 in free () from /lib/tls/i686/cmov/libc.so.6
#6 0xb7ee9b11 in operator delete () from /usr/lib/libstdc++.so.6
#7 0x0805a1d4 in cppalgo::DoubleList<CSessionThread*>::DeleteAt ()
#8 0x080598ad in CSessionManager::clearAll ()
#9 0x0805364a in CAppManager::startApplication ()
#10 0x0805c267 in main ()
(gdb)
'Linux' 카테고리의 다른 글
[Linux]error: `TCP_NODELAY' undeclared 에러 발생시 (0) | 2008.09.25 |
---|---|
[Linux]vim UTF-8 encoding type 설정 (0) | 2008.08.06 |
[Linux]디렉토리 전체의 인코딩을 euc-kr에서 utf-8로 바꾸기 (0) | 2008.08.06 |
[make]make 사용법 (0) | 2008.07.24 |
[Ubuntu]Samba 사용법 (0) | 2008.07.18 |