首页 > 解决方案 > GDB 未运行程序 (Mac OS)

问题描述

我使用 gdb 来运行我的程序,但它不适用于它。它返回警告:无法插入断点 -1。无法访问地址 0xf726 处的内存 我没有设置任何断点。我不确定这是 gdb 的问题,我该如何解决?这是我得到的结果:

rihiroshibitekiMacBook-Pro:desktop Richard$ gdb test
GNU gdb (GDB) 8.1
Copyright (C) 2018 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.3.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"...
Reading symbols from test...Reading symbols from 
/Users/Richard/Desktop/test.dSYM/
Contents/Resources/DWARF/test...done.
done.
(gdb) r
Starting program: /Users/Richard/Desktop/test 
[New Thread 0x1903 of process 776]
[New Thread 0x1c03 of process 776]
Warning:
Cannot insert breakpoint -1.
Cannot access memory at address 0xf726
Command aborted.

标签: cgdb

解决方案


推荐阅读