I haven’t have much luck with gdb. It doesn’t work for me starting from Mojave. A SO question that describes the symptom:
https://stackoverflow.com/questions/54416996/gdb-on-macos-mojave-10-14-2
Yuan