Windows 7, :
MinGW Eclipse CDT
0) python GDB, shell/command MinGW-get.exe ' GDB Python, .
MinGw-get.exe install gdb-python
1a) Python 2.7.x http://python.org/download/
1b) , PYTHONPATH PYTHONHOME :
PYTHONPATH should be C:\Python27\Lib (or similar)
PYTHONHOME should be C:\Python27
1c) PYTHONHOME PATH
%PYTHONHOME%;...
2a) , . , 3- , python. . !
python
import sys
sys.path.insert(0, 'C:/MinGW/share/gcc-4.6.1/python')
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers (None)
end
2b) '.gdbinit' . Windows , . ( ) . GDB init "" GDB, GBD .
2c) .gdbinit GDB ( , , IDE .
3) Eclipse ( IDE). ++ Debugger.
4) Eclipse C:\MinGW\bin\gdb-python27.exe .gdbinit .
5a) ( ).
--OR--
5b) gdb-python.exe .
:
- python python! MinGW, , MinGW . MinGW, , GCC ( ), python. - , python script, GDB.
- ,.gdbinit - PITA, , GDB , gdb-python.exe! GDB- GDB, , a) "python-enabled" .gdbinit.
- , . python "ImportError", , , PYTHONPATH PYTHONHOME.
- 'gdb-python27' (, C:\MinGW\bin ') , , eclipse , . , .gbdinit absoulte. , gbd (console- > gdb traces), :
835,059 4^done
835,059 (gdb)
835,059 5-enable-pretty-printing
835,069 5^done
....
835,129 12^done
835,129 (gdb)
835,129 13source C:\MinGW\bin\.gdbinit
835,139 &"source C:\\MinGW\\bin\\.gdbinit\n"
835,142 13^done
835,142 (gdb)