I\'d like to attach gdb to a process where I can\'t easily control the startup of the process because it is run from inetd and where the process completes too fast to be abl
What I'd like to do is insert a bit of code at the particular point that I want to start debugging.
I usually do it like this:
volatile int done = 0; while (!done) sleep(1);
Attach GDB (you'll be inside sleep). Do finish, then set var done = 1, and enjoy the rest of your debugging session ;-)
sleep
finish
set var done = 1