DEV Community

Discussion on: Setup gdb on macOS in 2020

Collapse
 
shellcromancer profile image
Daniel Stinon-Diess • Edited

Or you can use lldb instead! I found myself much happier after switching for debugging and program analysis tasks. Saved time from fighting the system and this is updated regularly with the macOS tool chains.

Collapse
 
jasonelwood profile image
Jason

Agreed! Unfortunately I'm taking a class that requires gdb.

Collapse
 
dnsmichi profile image
Michael Friedrich

If your application forks child processes, gdb supports following the forks. lldb unfortunately does not, and you have to workaround this with debug code to delay the child startup and re-attach to the PID. More here: stackoverflow.com/questions/147463...