imac的终端中进行gdb调试,打好断点后,运行报错,这是什么原因?

发布于 2022-09-07 15:55:55 字数 1406 浏览 17 评论 0

我写了简单的.c和makefile,通过HomeBrew安装的gdb,版本是GNU gdb (GDB) 8.1,打断点后运行就报错了,报错如下:请教各位是什么原因,多谢了!

localhost:skx_learn shikaixun$ gdb sort
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/g....
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/g....
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from sort...done.
(gdb) b 4
Breakpoint 1 at 0x100000dc5: file main.c, line 4.
(gdb) r
Starting program: /Users/shikaixun/skx_learn/sort
[New Thread 0x1803 of process 674]
[New Thread 0x2803 of process 674]
During startup program terminated with signal SIGTRAP, Trace/breakpoint trap.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文