I'm writing a program that involves controlling a tracee process with ptrace
. Of course, there are bugs :) To fix my bugs, I'd like to be able to inspect the tracee's state with gdb
. However, gdb -p
says:
warning: process X is already traced by process Y
If I just use PTRACE_DETACH
, then the tracee will resume executing until I launch gdb
, which can destroy the state I'm trying to examine.
Any suggestion for how to examine the runtime state of a ptrace tracee (perhaps with tools other than gdb
) is greatly appreciated.