From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id j1r4OnVBxV9zLwAAWB0awg (envelope-from ) for ; Mon, 30 Nov 2020 14:01:09 -0500 Received: by simark.ca (Postfix, from userid 112) id E7C911F0AB; Mon, 30 Nov 2020 14:01:09 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 60B151E590 for ; Mon, 30 Nov 2020 14:01:09 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1DE823898036; Mon, 30 Nov 2020 19:01:09 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 4D6F1386F030 for ; Mon, 30 Nov 2020 19:01:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 4D6F1386F030 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [10.0.0.11] (173-246-6-90.qc.cable.ebox.net [173.246.6.90]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id D7BA61E590; Mon, 30 Nov 2020 14:01:06 -0500 (EST) Subject: Re: [PATCH 11/12] gdb: make displaced stepping implementation capable of managing multiple buffers To: Pedro Alves , Simon Marchi , gdb-patches@sourceware.org References: <20201110214614.2842615-1-simon.marchi@efficios.com> <20201110214614.2842615-12-simon.marchi@efficios.com> <7cfcdcb4-f70f-a774-3378-e324735d1fe8@palves.net> From: Simon Marchi Message-ID: <2fff18e0-b304-5963-1fdd-58cec3c852c9@simark.ca> Date: Mon, 30 Nov 2020 14:01:06 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <7cfcdcb4-f70f-a774-3378-e324735d1fe8@palves.net> Content-Type: text/plain; charset=utf-8 Content-Language: fr Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2020-11-24 8:41 p.m., Pedro Alves wrote: > A few minor comments below. Otherwise LGTM. I forgot to reply to the other comments. > On 11/10/20 9:46 PM, Simon Marchi via Gdb-patches wrote: >> - return DISPLACED_STEP_PREPARE_STATUS_ERROR; >> + for (displaced_step_buffer &candidate : m_buffers) >> + { >> + bool bp_in_range = breakpoint_in_range_p (aspace, candidate.addr, len); >> + bool is_free = candidate.current_thread == nullptr; >> + >> + if (!bp_in_range) >> + { >> + if (is_free) > > tabs vs spaces. Done. >> + { >> + buffer = &candidate; >> + break; >> + } >> + else >> + { >> + /* This buffer would be suitable, but it's used right now. */ >> + fail_status = DISPLACED_STEP_PREPARE_STATUS_UNAVAILABLE; >> + } >> + } > > tabs vs spaces. Done. >> + struct displaced_step_buffer >> + { >> + displaced_step_buffer (CORE_ADDR addr) > > "explicit". Done. > >> + : addr (addr) >> + {} >> + >> + const CORE_ADDR addr; >> + >> + /* The original PC of the instruction currently begin stepped. */ > > "begin" -> "being" ? Indeed. Thanks, Simon