Should detach-on-fork be per-inferiour

Vladimir Prus vladimir@codesourcery.com
Mon Jul 9 20:01:00 GMT 2012


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/



More information about the Gdb mailing list