This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Should detach-on-fork be per-inferiour
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: <gdb at sourceware dot org>
- Date: Tue, 10 Jul 2012 00:01:29 +0400
- Subject: Should detach-on-fork be per-inferiour
At present, it seems like 'detach-on-fork' variable is global for GDB instance. Should it be possible to have this variable,
or some other one, working per-inferior. So that, after I attach to a couple of system processes, I can automatically attach
to children spawned by one process but not another?
Here's the output that illustates what I'm talking about:
(gdb) inferior 1
[Switching to inferior 1 [<null>] (<noexec>)]
(gdb) set detach-on-work off
No symbol table is loaded. Use the "file" command.
(gdb) inferior 2
[Switching to inferior 2 [<null>] (<noexec>)]
(gdb) set detach-on-fork on
(gdb) inferior 1
[Switching to inferior 1 [<null>] (<noexec>)]
(gdb) show detach-on-fork
Whether gdb will detach the child of a fork is on.
Thanks,
--
Vladimir Prus
CodeSourcery / Mentor Graphics
http://www.mentor.com/embedded-software/