From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23702 invoked by alias); 5 May 2009 20:38:43 -0000 Received: (qmail 23689 invoked by uid 22791); 5 May 2009 20:38:40 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 05 May 2009 20:38:32 +0000 Received: (qmail 13599 invoked from network); 5 May 2009 20:38:29 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 5 May 2009 20:38:29 -0000 From: Pedro Alves To: gdb@sourceware.org Subject: Re: Missing new inferior notification for core files Date: Tue, 05 May 2009 20:38:00 -0000 User-Agent: KMail/1.9.10 Cc: "Marc Khouzam" References: <6D19CA8D71C89C43A057926FE0D4ADAA0762F13E@ecamlmw720.eamcs.ericsson.se> <200905052129.01749.pedro@codesourcery.com> In-Reply-To: <200905052129.01749.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905052139.07139.pedro@codesourcery.com> 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: 2009-05/txt/msg00023.txt.bz2 On Tuesday 05 May 2009 21:29:01, Pedro Alves wrote: > A Tuesday 05 May 2009 21:15:23, Marc Khouzam wrote: > > Maybe this is a simple fix that can get in before branch time for 7.0? > > Patch and/or a bugzilla PR is welcome. On second thought, this way is simpler. Try this. I'm giving it a testsuite spin. We'll handle the inferior pid change later. -- Pedro Alves --- gdb/inferior.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) Index: src/gdb/inferior.c =================================================================== --- src.orig/gdb/inferior.c 2009-05-05 21:34:08.000000000 +0100 +++ src/gdb/inferior.c 2009-05-05 21:34:34.000000000 +0100 @@ -84,6 +84,8 @@ add_inferior_silent (int pid) inf->next = inferior_list; inferior_list = inf; + observer_notify_new_inferior (pid); + return inf; } @@ -92,8 +94,6 @@ add_inferior (int pid) { struct inferior *inf = add_inferior_silent (pid); - observer_notify_new_inferior (pid); - if (print_inferior_events) printf_unfiltered (_("[New inferior %d]\n"), pid);