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

新手上路,请多包涵

我写了简单的.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.

阅读 2.4k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题