From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117291 invoked by alias); 24 May 2016 16:39:08 -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 117277 invoked by uid 89); 24 May 2016 16:39:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=globally 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; Tue, 24 May 2016 16:39:07 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (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 341658E3D4; Tue, 24 May 2016 16:39:06 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u4OGd4Hf021383; Tue, 24 May 2016 12:39:05 -0400 Subject: Re: [PATCH 6/8] Make reinsert_breakpoint thread specific To: Yao Qi , gdb-patches@sourceware.org References: <1463757161-25850-1-git-send-email-yao.qi@linaro.org> <1463757161-25850-7-git-send-email-yao.qi@linaro.org> From: Pedro Alves Message-ID: <6a76af41-6946-15b8-13a8-2880ac415c65@redhat.com> Date: Tue, 24 May 2016 16:39:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <1463757161-25850-7-git-send-email-yao.qi@linaro.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2016-05/txt/msg00431.txt.bz2 On 05/20/2016 04:12 PM, Yao Qi wrote: > This patch makes reinsert_breakpoint thread specific, which means we > insert and remove reinsert_breakpoint breakpoints for a specific > thread. This motivation of this change is that I'll use > reinsert_breakpoint for vCont;s on software single step target, so that > GDBserver may insert one reinsert_breakpoint for step-over, and the > other one for vCont;s. Here I don't understand what you mean by "the other one". > After the operation of one thread is finished, > GDBserver must remove reinsert_breakpoint for that thread only. > > On the other hand, reinsert_breakpoint is used for step-over nowadays, > which is an operation to one thread in one go. "in one go" ? WDYM? > In other words, > reinsert_breakpoint is globally thread specific, but in an implicit way. Right. > index 4e45c0e..5d699c3 100644 > --- a/gdb/gdbserver/mem-break.c > +++ b/gdb/gdbserver/mem-break.c > @@ -211,6 +211,9 @@ struct other_breakpoint > struct reinsert_breakpoint > { > struct breakpoint base; > + > + /* Thread the reinsert breakpoint belongs to. */ > + ptid_t id; It's much more usual to call this "ptid". From the ChangeLog, I first though you were adding a "breakpoint number" kind of id. > }; > > /* Return the breakpoint size from its kind. */ > @@ -1476,25 +1479,32 @@ gdb_breakpoint_here (CORE_ADDR where) > } > > void > -set_reinsert_breakpoint (CORE_ADDR stop_at) > +set_reinsert_breakpoint (CORE_ADDR stop_at, ptid_t id) Ditto. (Likewise other places.) Otherwise LGTM. Thanks, Pedro Alves