This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

process attaching gdb to itself


Hi all,

How can I have a running process gracefully attach gdb to itself ? I've tried something like :

char cmd [256];
sprintf (cmd, "gdb attach %d", getpid ());
system (cmd);

which has the desired effect. However, once in gdb, the debugger is stuck in wait4(2) and I cannot find a way to resume execution.

Thanks,
Aurelien


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]