I was just reading this answer on StackOverflow, "How can you debug a process using gdb without pausing it?"
The Linux kernel provides some support for this via
PTRACE_SEIZE, but gdb doesn't use this yet. There's a bug in bugzilla you can track, "Bug 15250 - usePTRACE_SEIZEandPTRACE_INTERRUPT"
I was able to find PTRACE_SEIZE documented in man ptrace,
PTRACE_SEIZE(since Linux 3.4): Attach to the process specified in pid, making it a tracee of the calling process. UnlikePTRACE_ATTACH,PTRACE_SEIZEdoes not stop the process. Group- stops are reported asPTRACE_EVENT_STOPandWSTOPSIG(status)returns the stop signal. Automatically attached children stop withPTRACE_EVENT_STOPandWSTOPSIG(status)returnsSIGTRAPinstead of havingSIGSTOPsignal delivered to them.execve(2)does not deliver an extraSIGTRAP. Only aPTRACE_SEIZEd process can acceptPTRACE_INTERRUPTandPTRACE_LISTENcommands. The "seized" behavior just described is inherited by children that are automatically at‐ tached usingPTRACE_O_TRACEFORK,PTRACE_O_TRACEVFORK, andPTRACE_O_TRACECLONE. addr must be zero. data contains a bit mask of ptrace options to activate immediately. Permission to perform aPTRACE_SEIZEis governed by a ptrace access modePTRACE_MODE_ATTACH_REALCREDScheck; see below.
That raises the question if PTRACE_SEIZE isn't supported by gdb, what tooling (if any) does support this functionality on Linux?