Environment: Mac/Mojave and GDB 8.2.1 (via homebrew).
I worked through instructions https://forward-in-code.blogspot.com/2018/11/mojave-vs-gdb.html i.e.:
latest GDB via brew, which solves the executable format issue
sign GDB with new entitlements
Additionally, I've also modified SIP to allow debugging (in Recovery OS terminal: csrutil enable --without debug
).
However, I still can’t get gdb to work:
(gdb) file main
Reading symbols from main...done.
(gdb) run
Starting program: /Users/joubertold/code/Rhodus/obj/debug/main
[New Thread 0x1a03 of process 5082]
[New Thread 0x2803 of process 5082]
During startup program terminated with signal ?, Unknown signal.
(gdb)
Interestingly, lldb works for me on the same binary:
(lldb) file main
Current executable set to 'main' (x86_64).
(lldb) run
Process 5086 launched: '/Users/joubertold/code/Rhodus/obj/debug/main' (x86_64)
Rhodus
1 is ONE
1 is between 1 and 10
1 is between 1 and 10
1 is between 1 and 10
1 is between 1 and 10
1 is between 1 and 10
1 is between 1 and 10
1 is between 1 and 10
1 is between 1 and 10
1 is beyond
1 is beyond
1 is beyond
Process 5086 exited with status = 0 (0x00000000)
(lldb)
Any thoughts?