I have installed gdb on Mojave 10.14.2 following the description given in here:
https://sourceware.org/gdb/wiki/PermissionsDarwin
When I try to run the executable, it complains:
Starting program: /Users/sfv/test/code1
[New Thread 0x1a03 of process 4658]
During startup program terminated with signal ?, Unknown signal.