我已经查看了调试器可能无法在C :: B中运行的常见原因,但我无法在线找到解决我特定问题的任何内容。
当我尝试开始调试时,调试器会吐出下面的日志。
有没有人能够在运行Parallels时让gdb调试器在C :: B中工作?
Starting debugger: C:\Program Files (x86)\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet -args /Mac/Home/Desktop/Foo/bin/Debug/Foo.exe
done
[debug]> set prompt >>>>>>cb_gdb:
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
[debug]/Mac/Home/Desktop/Foo/bin/Debug/Foo.exe: No such file or directory.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.6.1
[debug]Copyright (C) 2013 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law. Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "mingw32".
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (GDB) 7.6.1
[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> source C:\Program Files (x86)\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
[debug]>>>>>>cb_gdb:
[debug]> directory /Mac/Home/Desktop/Foo/
[debug]Source directories searched: /Mac/Home/Desktop/Foo;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "//Mac/Home/Desktop/Foo/main.c:12"
[debug]No symbol table is loaded. Use the "file" command.
[debug]Breakpoint 1 ("//Mac/Home/Desktop/Foo/main.c:12") pending.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]No executable specified, use `target exec'.
[debug]Starting program:
[debug]>>>>>>cb_gdb:
Starting the debuggee failed: No executable specified, use `target exec'.
[debug]> quit
Debugger finished with status 0
答案 0 :(得分:0)
问题似乎是gdb无法处理从OS X上的根目录下降的路径,即使您看起来已从路径中删除了所有空格(这是典型的解决方案)在Windows上,如果你环顾网络。)
虽然远非理想,但为了能够在Windows VM上的Code :: Blocks中调试项目,您需要在从虚拟C:\目录下载的文件夹中创建项目。然后调试器应该工作。
答案 1 :(得分:0)
我有一个类似的问题,我解决了我的右键单击我的.cpp文件,转到属性,然后是构建选项卡,并确保&#34;编译文件&#34;和#34;链接文件&#34;选中框并且&#34;属于目标:&#34; &#34;调试和#34;和&#34;发布&#34;盒子被检查。