Lie in wait for a launching process (gdb->General)Attaching to a running process is pretty nifty, handy for debugging daemons started by launchd. But you miss all the fun stuff that happens at program launch before you you can attach to it.The
attachcommand's-waitforoption to make gdb lie in wait for a launching process:% gdb /some/app/blah (gdb) attach -waitfor blahNow when ablahprocess launches, gdb will stop it and attach to it.