2012년 3월 7일 수요일

gcc 에서 디버깅심볼을 별도 파일로 저장하기.

http://stackoverflow.com/questions/866721/how-to-generate-gcc-debug-symbol-outside-the-build-target

분리할 때..
gcc -ggdb -o test test.c;
cp test test.debug;
strip --only-keep-debug test.debug;
strip test;


합칠 때
objcopy --add-gnu-debuglink=test.debug test


gdb 에서..
http://sigquit.wordpress.com/2008/09/15/debugging-programs-with-a-external-symbol-file/
(gdb) symbol-file test.debug

댓글 없음: