GDB ver. 7.0부터 stl pretty printing을 지원한다고 한다. Gentoo에서는 gdb USE flag에 python을 추가한 후 emerge하면 된다.
gdb 초기화 파일 ( .gdbinit ) 에
출처:http://wiki.eclipse.org/CDT/User/FAQ#How_can_I_inspect_the_contents_of_STL_containers.3F
gdb 초기화 파일 ( .gdbinit ) 에
python import sys sys.path.insert(0, '/usr/share/gcc-data/i686-pc-linux-gnu/4.5.3/gcc-4.5.3/python') from libstdcxx.v6.printers import register_libstdcxx_printers register_libstdcxx_printers (None) end이 후부터는 gdb에서 STL 변수출력이 일반 변수출력처럼 나온다.
출처:http://wiki.eclipse.org/CDT/User/FAQ#How_can_I_inspect_the_contents_of_STL_containers.3F
'프로그래밍' 카테고리의 다른 글
| how to compile boost library with Mingw (0) | 2012/03/31 |
|---|---|
| STL debug 메시지 출력을 위한 GDB 세팅 (0) | 2012/01/10 |
| C언어 2차원 배열 선언 (1) | 2011/09/04 |
| Notice between pgf90 and gfortran (0) | 2011/07/26 |
| 소스분석도구 (0) | 2011/02/26 |
| Fortran 90 study note (0) | 2011/02/09 |
