http://en.wikibooks.org/wiki/Linux_Applications_Debugging_Techniques/Deadlocks
쓰레드 디버깅 방법( linux)
모든 thread에 대해서 backtrace
(gdb) thread apply all bt
특정 thread 선택
(gdb) thread 4
스택위치 지정
(gdb) frame 2
레지스터 정보 확인
(gdb) info reg ... r8 0x6015a0 6296992
뮤텍스 정보 확인
(gdb) p *(pthread_mutex_t*)0x6015a0
pthread_mutext_t를 보기위한 symbol table이 로딩되지 않을 경우
(gdb) print *((int*)(0x6015e0)) $4 = 2 (gdb) print *((int*)(0x6015e0)+1) $5 = 0 (gdb) print *((int*)(0x6015e0)+2) $6 = 12275
'C언어' 카테고리의 다른 글
c11 추가된 내용 (0) | 2015.03.20 |
---|---|
tokyocabinet threading error (0) | 2015.03.18 |
pthread automic operation (0) | 2015.03.04 |
pthread_create@@GLIBC_2.2.5 (in /lib64/libpthread-2.12.so) (0) | 2015.03.03 |
구조체 선언과 동시에 초기값 설정 (0) | 2015.02.13 |