Running to debug with gdb
(gdb)breakmain
Breakpoint 1 at 0x100000f3f: file hello world.c, line 4.
(gdb)run
Starting program: /Users/RS/Desktop/prog/a.out
New Thread 0x1903 of process 28784
New Thread 0x1c03 of process 28784
During startup program terminated with signal?, Unknown signal
The program does not work.
Also,
During startup programmed with signal SIGTRAP
In some cases, the termination as .
What's the problem?
Also, how can we solve this problem?
The operating system is macOS High Sierra 10.13.1
. c++ c macos gdb
I heard that this is a common problem with using gdb after Sierra, and I have a similar question with the English version of SO.
GDBkind of doesn't work on macOS Sierra
You may be able to solve this problem by writing set startup-with-shell off
in through /.gdbinit
, or by upgrading your gdb to a new version.
I have encountered a similar problem myself, but I have given up using gdb and am using lldb.
© 2024 OneMinuteCode. All rights reserved.