gdb + gdbserver 로 동적 라이브러리 디버깅하기
글쓴이: poplinux / 작성시간: 수, 2007/11/14 - 10:23오전
다음과 같은 방법으로 라이브러리 디버깅을 하려고 했습니다.
target
/lib 에 라이브러리와 바이너리를 올린다.
host
/home/work/lib/ 에 라이브러리와 라이브러리를 사용하는 바이너리를 올린다.
target
gdbserver 192.168.1.10:10000 ./binary
host
arm-linux-gdb ./binary
gdb : set solib-absolute-prefix /home/work/lib
gdb : target remote 192.168.1.10:1000
Remote debugging using 192.168.1.10:10000
0x40002980 in ?? ()
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
gdb : b $(FUNCTION)
gdb : c위와 같이 진행하면
Continuing. Error while mapping shared library sections: /lib/libtest.so: 그런 파일이나 디렉토리가 없음
이라고 나옵니다.
물론 step 으로 이동해도 라이브러리 펑션을 디버깅 할 수 없는 상황이지요.
어찌 해야 할까요?
Forums:


댓글 달기