This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: fork debugging : back to parent.
I have version 6.5.5 just build and confirmed with "show version"
,----
| show version
| GNU gdb 6.5.50.20060806
| Copyright (C) 2006 Free Software Foundation, Inc.
| GDB is free software, covered by the GNU General Public License, and you are
| welcome to change it and/or distribute copies of it under certain conditions.
| Type "show copying" to see the conditions.
| There is absolutely no warranty for GDB. Type "show warranty" for details.
| This GDB was configured as "i686-pc-linux-gnu".
| >
`----
set follow-fork-mode to both is not supported:
,----
| >help set follow
| 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.
| >set follow-fork-mode both
| Undefined item: "both".
| >set follow-fork-mode child
| >
`----
Sorry, if I'm missing something obvious. How owuld I browse "recent
features" in CVS?
Daniel Jacobowitz <drow@false.org> writes:
> On Mon, Aug 07, 2006 at 01:21:02PM -0700, Richard (sent by Nabble.com) wrote:
>>
>> Below is the code from "Advanced programming in the Unix environment". if I
>> set follow-fork to child, I can step ok to the exclp line. But how do I get
>> back to debugging the parent process? Is it possible? I tried setting
>> follow-fork back to "parent" and then "c"ontinuing but no joy. or do I have
>> to specifically save process ids and reattach to the parent process?
>
> Try using a recent version of GDB, and set follow-fork-mode to "both".
> This was added in GDB 6.5.
>
> --
> Daniel Jacobowitz
> CodeSourcery
>
--