• 2
  • 新人请关照

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.

阅读 948
评论
    0 个回答
    撰写回答

    登录后参与交流、获取后续更新提醒