From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116073 invoked by alias); 18 May 2016 07:50:11 -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 116044 invoked by uid 89); 18 May 2016 07:50:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Things, harmful, antoine, management X-HELO: mail-pf0-f193.google.com Received: from mail-pf0-f193.google.com (HELO mail-pf0-f193.google.com) (209.85.192.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 18 May 2016 07:49:59 +0000 Received: by mail-pf0-f193.google.com with SMTP id 145so4299970pfz.1 for ; Wed, 18 May 2016 00:49:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=O8KrtBsSAQJ00r6PI8USN6B8kaTnT+xre8dKdDmhHmM=; b=b+LUw/jzRH/LVEgtqWNRzuO82tzm4Vmn34xybuzMkBex2en+Mha4JH5Tkx1bLOWoOs 9ZfmT6BkalSm5xNBQId0IxkYbt8mjj8fowk9GWJ2N3o4NbNizpH2kFRyMV9zFehyY6Jj b792pFh/4VE3sp6sKL183soofsPR3yxBBabVIeJZVSt/aYtlOCoS6lDZBRwDSPWE/fZX bPPA+3qLVVrl+FU9WbIDqAXDXOW/Mv8rhH4eyHkSqO6ZsksaH05nrHiJ0kMEUzrvjUwi P+hacbCfg4JR/s//DY/gznizM3FGPmqHaOQUCf7zTafeeot6sOOXXIE69qUZfwUTRYzt eITg== X-Gm-Message-State: AOPr4FXdU9N8EpLsOaKrtZs6iPNREk1vGiK33dL8WkMnXAIuyX5BCZ8RLiRsJDshuNtk4A== X-Received: by 10.98.23.211 with SMTP id 202mr8815483pfx.122.1463557798043; Wed, 18 May 2016 00:49:58 -0700 (PDT) Received: from E107787-LIN (gcc113.osuosl.org. [140.211.9.71]) by smtp.gmail.com with ESMTPSA id n6sm9878398pfa.2.2016.05.18.00.49.54 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 18 May 2016 00:49:57 -0700 (PDT) From: Yao Qi To: Antoine Tremblay Cc: Yao Qi , Subject: Re: [RFC 0/3] Use reinsert breakpoint for vCont;s References: <1462530736-25117-1-git-send-email-yao.qi@linaro.org> Date: Wed, 18 May 2016 07:50:00 -0000 In-Reply-To: (Antoine Tremblay's message of "Tue, 17 May 2016 10:08:33 -0400") Message-ID: <867ferajqb.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-05/txt/msg00289.txt.bz2 Antoine Tremblay writes: > I think like you did in patch 2 before we know we're reporting to GDB > the right place too, but adding a > prepare_to_access_memory/done_accessing_memory lock around the delete / > insert reinsert breakpoints is needed. prepare_to_access_memory and done_accessing_memory are used when *GDB* wants to access memory, not GDBserver. > > Actually pretty much the only thing that single step reinsert breakpoints= have > in common with step over reinsert breakpoints is that they're > inserted as a GDBServer breakpoint. No other code path is the same, afaic= k. > They use the_low_target.get_next_pcs to know the next pcs. > I think it would be more clear to have a different kind of breakpoint so = that : > > - We can protect these breakpoints with prepare_to_access_memory > without affecting the step over reinsert breakpoints, that do not need t= his. prepare_to_access_memory can't be used here, because it is "prepare for the memory access requested by GDB". > - Have these breakpoints thread specific, again something that > step-over breakpoints do not need. Nowadays, we do step-over once per thread, so it is not harmful to make reinsert breakpoint thread specific. > > The added logic to the control flow should be about the same or less > than by sharing the reinsert_breakpoints. > > Also, when changing code related to either of the 2 scenarios we would not > fear breaking one or the other. Things are already mangled enough > in that area ? I don't think we can deal with the control flow or logic separately, because we add breakpoint for vCont;s, and breakpoint and event management should be done in linux_wait_1 and linux_resume. Adding a new kind of breakpoint doesn't help, IMO. I've got a regression-free patch series, but need to remove some redundant code, and post the out for review. --=20 Yao (=E9=BD=90=E5=B0=A7)