From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31788 invoked by alias); 13 Apr 2011 13:33:32 -0000 Received: (qmail 31780 invoked by uid 22791); 13 Apr 2011 13:33:31 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Apr 2011 13:33:22 +0000 Received: by vws4 with SMTP id 4so609089vws.0 for ; Wed, 13 Apr 2011 06:33:21 -0700 (PDT) Received: by 10.52.112.69 with SMTP id io5mr737281vdb.94.1302701601221; Wed, 13 Apr 2011 06:33:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.175.197 with HTTP; Wed, 13 Apr 2011 06:33:01 -0700 (PDT) In-Reply-To: References: From: Kevin Pouget Date: Wed, 13 Apr 2011 13:33:00 -0000 Message-ID: Subject: Follow-fork-mode and inferiors To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-04/txt/msg00041.txt.bz2 Hello, I noticed a behavior which appears strange to me, I would like to know if it was expected: > (gdb) list > 1=A0=A0=A0 int main() { > 2=A0=A0=A0 =A0=A0=A0 fork() ; > 3=A0=A0=A0 } > > (gdb) break 3 > (gdb) set follow-fork-mode child > (gdb) run > ... > Breakpoint 1, main () at fork.c:3 > 3=A0=A0=A0 } > (gdb) info inferiors > =A0 Num=A0 Description=A0=A0=A0=A0=A0=A0 Executable > * 2=A0=A0=A0 process 26039=A0=A0=A0=A0 /home/kevin/travail/arm/perso/root= /sample/fork-threads/fork > =A0 1=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 /home/kevin/travai= l/arm/perso/root/sample/fork-threads/fork why are there two inferiors? I expected either to stay in inf 1 (if the pid of an inferior can change) or inf 1 to disappear, but not to keep both of them! thanks, Kevin