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