I have a simple C program that forks a process and then runs an executable.
I want to attach the child process to gdb.
I run the main program in a console
With a running instance of myExecutableName having a PID 15073:
myExecutableName
15073
hitting Tab twice after $ gdb myExecu in the command line, will automagically autocompletes to:
$ gdb myExecu
$ gdb myExecutableName 15073
and will attach gdb to this process. That's nice!