From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10957 invoked by alias); 20 Jul 2010 12:56:39 -0000 Received: (qmail 10943 invoked by uid 22791); 20 Jul 2010 12:56:38 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 20 Jul 2010 12:56:32 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6KCuO9U003796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 20 Jul 2010 08:56:24 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6KCuLC4025025 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Jul 2010 08:56:23 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o6KCuKFg012278; Tue, 20 Jul 2010 14:56:20 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o6KCuKeY012277; Tue, 20 Jul 2010 14:56:20 +0200 Date: Tue, 20 Jul 2010 12:56:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [patch] Fix linux-nat.c new_lp dropped status Message-ID: <20100720125620.GA12185@host1.dyn.jankratochvil.net> References: <20100718220853.GA3011@host1.dyn.jankratochvil.net> <201007201346.21224.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201007201346.21224.pedro@codesourcery.com> User-Agent: Mutt/1.5.20 (2009-12-10) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-07/txt/msg00298.txt.bz2 On Tue, 20 Jul 2010 14:46:20 +0200, Pedro Alves wrote: > On Sunday 18 July 2010 23:08:53, Jan Kratochvil wrote: > It does to me. Okay, thanks. Checked-in, with a forgotten ChangeLog entry this time. > > No regressions on {x86_64,x86_64-m32,i686}-fedora12-linux-gnu. ^^=13 in my recent mails. Thanks, Jan http://sourceware.org/ml/gdb-cvs/2010-07/msg00113.html --- src/gdb/ChangeLog 2010/07/20 12:33:29 1.12001 +++ src/gdb/ChangeLog 2010/07/20 12:54:57 1.12002 @@ -1,5 +1,10 @@ 2010-07-20 Jan Kratochvil + * linux-nat.c (linux_handle_extended_wait): Handle case when + event == PTRACE_EVENT_CLONE && stopping && WSTOPSIG (status) != SIGSTOP. + +2010-07-20 Jan Kratochvil + Code cleanup. * linux-nat.c (linux_nat_wait_1): Reset STATUS after calling linux_nat_wait_1. Use always LP->STATUS afterwards. --- src/gdb/linux-nat.c 2010/07/20 12:33:30 1.175 +++ src/gdb/linux-nat.c 2010/07/20 12:54:57 1.176 @@ -2279,6 +2279,23 @@ linux_ops->to_resume (linux_ops, pid_to_ptid (new_pid), 0, signo); } + else + { + if (status != 0) + { + /* We created NEW_LP so it cannot yet contain STATUS. */ + gdb_assert (new_lp->status == 0); + + /* Save the wait status to report later. */ + if (debug_linux_nat) + fprintf_unfiltered (gdb_stdlog, + "LHEW: waitpid of new LWP %ld, " + "saving status %s\n", + (long) GET_LWP (new_lp->ptid), + status_to_str (status)); + new_lp->status = status; + } + } if (debug_linux_nat) fprintf_unfiltered (gdb_stdlog,