From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2684 invoked by alias); 5 Jun 2014 12:52:28 -0000 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 Received: (qmail 2673 invoked by uid 89); 5 Jun 2014 12:52:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Jun 2014 12:52:26 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s55CqNMG032364 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 5 Jun 2014 08:52:23 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s55CqLjk029677; Thu, 5 Jun 2014 08:52:22 -0400 Message-ID: <53906804.3070107@redhat.com> Date: Thu, 05 Jun 2014 12:52:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 MIME-Version: 1.0 To: Don Breazeal , gdb-patches@sourceware.org Subject: Re: [PATCH] Fix for follow-fork: followed child doesn't stop References: <1401920383-10219-1-git-send-email-donb@codesourcery.com> In-Reply-To: <1401920383-10219-1-git-send-email-donb@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-06/txt/msg00249.txt.bz2 Hi Don, On 06/04/2014 11:19 PM, Don Breazeal wrote: > Using the test program gdb.base/foll-fork.c, with follow-fork-mode > set to "child" and detach-on-fork set to "on", stepping past the > fork call results in the child process running to completion, when > it should just finish the single step. > > This is the result of how the single-step state is transferred from > the parent to the child in infrun.c:follow_fork. For the parent, the > single-step breakpoint is marked as "inserted" (bp->loc->inserted). > The breakpoint is transferred to the child, where it clearly has never > been inserted. Was it removed from the parent already at this point? If so, why is it still marked as inserted? If not, then it would sound like your patch would make us miss removing it. -- Pedro Alves