eclipse调试C++代码报错: Could not determine GDB version using command: gdb --version
2016-08-04 23:13
2967 查看
$ gdb GNU gdb (GDB) 7.11.1 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-w64-mingw32". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word". Traceback (most recent call last): File "<string>", line 3, in <module> ImportError: No module named libstdcxx.v6.printers d:\msyq64\mingw64\bin\../etc/gdbinit:5: Error in sourced command file: Undefined command: "". Try "help". (gdb) q
按照报错提示,打开d:\msyq64\mingw64\bin\../etc/gdbinit看了下内容:
python
import sys
sys.path.insert(0, sys.path[0] + '/../../gcc-5.3.0/python')
from libstdcxx.v6.printers import register_libstdcxx_printers
register_libstdcxx_printers (None)
end
可疑的是里面有gcc版本号,于是我看了一下我当前gcc的版本号:
$ gcc -v
Using built-in specs.
COLLECT_GCC=D:\msys64\mingw64\bin\gcc.exe
COLLECT_LTO_WRAPPER=D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-6.1.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev1, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 6.1.0 (Rev1, Built by MSYS2 project)
发现并不是5.3.0,于是尝试将d:\msyq64\mingw64\bin\../etc/gdbinit中的gcc-5.3.0改成gcc-6.1.0,然后再将执行了一下gdb:
$ gdb
GNU gdb (GDB) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb)
居然好了,特将此记录,供各位参考。
相关文章推荐
- Eclipse中写C/C++代码、Eclipse卡顿调优、Error while launching command: gdb --version
- 解决golang windows调试问题:Could not determine version number: could not find symbol value for runtime.buildVersion
- 解决Eclipse中C++代码显示Symbol 'std' could not be resolved的问题
- 解决Eclipse中C++代码显示Symbol 'std' could not be resolved的问题
- 新建Android studio项目后出现Error:Could not determine Java version using executable
- 解决Eclipse中C++代码显示Symbol 'std' could not be resolved的问题
- 如何用Eclipse加断点调试C++代码?
- 使用eclipse调试cocos2d-x C++ 代码(编写+真机调试,放弃VS)
- eclipse编译调试java与ndk c++的混合代码
- 【COCOS2DX-游戏开发之十】使用eclipse调试cocos2d-x Native C++ 代码
- eclipse中jni调试本地C++代码步骤
- eclipse 调试时出现!MESSAGE Could not find bundle: org.eclipse.equinox.console解决办法
- apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName错误的解决方法
- Ubuntu 下修改 Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
- 如何使用Eclipse和GDB对JNI代码进行调试(JAVA和C)
- Eclipse 运行项目抛UnsupportedClassVersionError弹出yunCould not find the main class.program will exit
- Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerNam
- Could not execute auto check for display colors using command
- Using C++ in Eclipse - "Program file not Specified" problem
- eclipse编译调试java与ndk c++的混合代码