让GDB 8.0.1在OSX High Sierra 10.13.4上的CLion中运行

时间:2018-05-24 14:06:25

标签: c++ macos gdb code-signing clion

长话短说 - LLDB没有正确调试我的程序,因此我需要在Mac上使用GDB来调试c ++项目。我采取的步骤:

  • 通过brew / macports安装GDB 8.0.1和8.1(即尝试所有选项)
  • 正确地对二进制文件进行编码。
  • 以重启模式启动mac并输入csrutil enable --without debug
  • 在Clion中选择自定义GDB可执行文件。
  • 写入主目录中的.gdbinit文件,设置startup-with-shell off

当我在Clion中进行调试时,在调试器窗口中它显示为:

GNU gdb (GDB) 8.0.1
Copyright (C) 2017 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-apple-darwin17.2.0".
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".
[New Thread 0x2203 of process 1208]
warning: unhandled dyld version (15)

在控制台窗口中,它只打印可执行文件的路径,然后挂起,直到最终显示“命令超时”。

任何想法都会受到广泛赞赏。

0 个答案:

没有答案