From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45433 invoked by alias); 21 Jul 2016 10:02:25 -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 45390 invoked by uid 89); 21 Jul 2016 10:02:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 21 Jul 2016 10:02:23 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 92CDD711DF; Thu, 21 Jul 2016 10:02:22 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6LA2LOb001287; Thu, 21 Jul 2016 06:02:21 -0400 Subject: Re: [PATCH 8/9] Use reinsert_breakpoint for vCont;s To: Yao Qi References: <1467295765-3457-1-git-send-email-yao.qi@linaro.org> <1467295765-3457-9-git-send-email-yao.qi@linaro.org> <861t38zekw.fsf@gmail.com> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <81859bd3-de6e-e986-072a-20087ea00cb7@redhat.com> Date: Thu, 21 Jul 2016 10:02:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <861t38zekw.fsf@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-07/txt/msg00238.txt.bz2 On 07/05/2016 09:14 AM, Yao Qi wrote: > Pedro Alves writes: > >>> if thread 1 doesn't hit the reinsert breakpoint, we don't have to >>> remove them, because GDB will send vCont;s:1 next time, and GDBserver >> >> There's no guarantee GDB will send vCont;s:1 next time. >> The user may do "continue" instead of "step". >> >>> can only install reinsert breakpoints if they are not installed yet. >> >> The user may even do "return + continue" or "jump", or an infcall, >> all of which resume the thread at a different address from the address >> the thread last stopped. So there's no guarantee that the >> reinsert breakpoint address makes any sense for the next step request, >> or even that the next resume request is a step in the first place. >> >> Basically the previous step request must be completely forgotten after >> gdb has seen the thread stop. In all-stop, gdb "sees "all threads >> stopped on each and every event reported to gdb, for any thread. >> A stop reply cancels any and all previous resume requests. > > I add some code to delete all reinsert breakpoints for all threads in > all-stop. See the patch below, This version looks good to me. Thanks, Pedro Alves