A day of groping and finally getting this problem fixed.
First download MinGW
Address: Http://sourceforge.net/projects/mingw/?source=directory
Install g++ after download, and follow the steps in the Setup program
Then use cmd to install Gdb-python
MinGw-get.exe install gdb-python
install GDB at the same time
Also follow these steps to install and configure Python
1) Download Python 2.7.x from http://python.org/download/
2) Setting Python environment variables
PYTHONPATH 应该是 C:\Python27\Lib (或者类似的) PYTHONHOME 应该是 C:\Python27
3) Add the Pythonhome to the path directory
%PYTHONHOME%;...
4) Open the text editor and enter the following to save as. gdbinit files, and placed under the same path as Gdb-python27.exe, typically similar to this:C:\MinGW\bin\gdb-python27.exe
pythonImportSyssys.Path.Insert(0, ' C:/mingw/share/gcc-4.6.1/python ')#此目录是放置打印的python脚本的地方, typically under a similar directory from Libstdcxx.V6.PrintersImportregister_libstdcxx_printersregister_libstdcxx_printers(None)End
5) Turn on Eclipse to configure the MinGW as follows (if configured, ignore)
Http://jingyan.baidu.com/article/380abd0a5888211d90192cd6.html
6) Configure the GDB path with the. Gdbinit path
Open Window---preferences, C + +, Debug. GDB change to the right gdb debugger and gdb command file
Note that debugger must be gdb-python27.exe and not gdb.exe. Python will not be supported
Finally, it shows the following
Reference:
Http://wiki.eclipse.org/CDT/User/FAQ#CDT_does_not_recognize_C.2B.2B11_features
Http://stackoverflow.com/questions/21376381/debugging-stl-containers-using-mingw-issue-with-python-script
http://stackoverflow.com/questions/148281/eclipse-c-pretty-printing/14266862#14266862
GDB Debug Output STL Container content (Ultimate solution) under Windows Eclipse