c - 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.
解决方案
推荐阅读
- python - 基于数据类型的numpy数组拆分?
- java - 无效的 XML:没有为命名空间 <> 声明别名;在爪哇
- javascript - 从浏览器运行本地网络服务器的可能性
- javascript - 带字符边框的数字输入
- java - 与 Java 的版本历史混淆
- python - 当压缩设置为 gzip 时,Python pandas 给出 UnicodeDecodeError 'charmap' codec can't decode byte 错误
- python - 更改文本文件的内容并创建具有相同格式的新文件
- c++ - 关于 ENUM 的 C++ 问题。我得到的响应大于枚举列表
- eiffel - 有没有办法为参数指定各种类型
- c++ - 无法识别 C++ CreateProcess 'telnet'