태터데스크 관리자

도움말
닫기
적용하기   첫페이지 만들기

태터데스크 메시지

저장하였습니다.

롸이언의 인생이야기 @ Innovate yourself ™

'pthread'에 해당되는 글 1건

  1. 2008/01/22 SIG32 with Linux and pthreads (gdbserver)
SIG32 with Linux and pthreads

gdbserver 사용시, SIG32를 받고 바로 죽는 경우가 있다.

간단한 프로그램은 상관없으나, pthread를 사용하는 프로그램의 경우 이런 현상 발생한다.

근본적인 원인은 GDB가 프로그램을 실행할때 공유라이브러리(.so)파일을 로딩하지 못하거나, 로딩을 하더라도 .so파일이 striped 된 상태라 디버깅 정보가 없는 경우 발생한다.

일차적으로 Ramdisk의 lib 폴더에 있는 so파일들의 strip상태를 확인한다.

[aaa@host lib]$ file libpthread-0.10.so
libpthread-0.10.so: ELF 32-bit LSB shared object, ARM, version 1, for GNU/Linux 2.4.3, not stripped

이렇게 나온다면 문제가 없을것이다.

so 파일들을 체크하여 문제가 없다면 해당 so 파일을 GDB에서 로딩하지 못해서 발생하는 경우이다.

이경우에는 gdb를 실행하고 환경 변수를 설정해 주면 해결 할 수 있다.
[root@localhost s179]# gdb
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 "--host=i686-pc-linux-gnu --target=arm-linux".
(gdb) set solib-absolute-prefix /home/smshin/opt/crosstool/arm-linux/gcc-3.4.4-glibc-2.3.5/arm-linux/arm-linux/
(gdb) set solib-absolute-prefix RAMDISK LIB위치
(gdb) set solib-absolute-prefix APPLICATION LIB 위치

크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by 롸이언
공부 이야기/컴퓨터 몽땅 l 2008/01/22 20:12
1 

카테고리

꼭대기 (82)
롸이언 이야기 (7)
가족 이야기 (0)
친구 이야기 (1)
공부 이야기 (51)
취미 이야기 (17)
노래 이야기 (1)

달력

«   2010/07   »
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Statistics Graph
tistory!get rss Tistory Tistory 가입하기! DNS Powered by DNSEver.com