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]

Re: follow-fork and detach-on-fork should have one command


On Mon, Apr 10, 2006 at 10:06:28AM -0700, PAUL GILLIAM wrote:
> Currently follow-fork is yes or no and detach-on-fork is yes or no.
> 
> It seems to me that it would be clearer if there was only one, with
> three states "parent", "child", "both".
> 
> Feel free to flame me if this has already been talked to death.

(gdb) set follow-fork-mode yes
Undefined item: "yes".
(gdb) set follow-fork-mode no
Undefined item: "no".
(gdb) help set follow-fork
Set debugger response to a program call of fork or vfork.
A fork or vfork creates a new process.  follow-fork-mode can be:
  parent  - the original process is debugged after a fork
  child   - the new process is debugged after a fork
The unfollowed process will continue to run.
By default, the debugger will follow the parent process.

Once upon a time, there was a "both" item in this menu.  It was
supposed to spawn two GDBs, one attached to each.  I think
set detach-on-fork off is a reasonable behavior for "set follow-fork
both".  Michael, how about you?

-- 
Daniel Jacobowitz
CodeSourcery


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