This is the mail archive of the gdb@sourceware.org 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]

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/


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