最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

bash - Cannot exit when running GDB in the command line, it gets stuck - Stack Overflow

programmeradmin0浏览0评论

In MacOS I created a program called main, which simply prints a text.

I'm running it with sudo, but when I use the start command of the debugger, it gets stuck no matter what I type afterwards, and I cannot exit even when using Ctr+C:

sudo gdb ./main
list
(gdb) list
1 #include <stdio.h>
2
3 int main()
4 {
5 printf("hello world, my friedffddfggfnd!");
6 return 0;
7 }
(gdb) start
Temporary breakpoint 1 at 0x100003f4f: file main.c, line 5.
Starting program: /Users/something/CLionProjects/C_Practice/main
[New Thread 0x2703 of process 5786]
[New Thread 0x2403 of process 5786]
[Thread 0x2703 of process 5786 exited]
exit 
quit

it gets stuck here

asdffgdsg
^C
^C

nothing works

I have to manually close the bash window to exit

发布评论

评论列表(0)

  1. 暂无评论