From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44713) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmtbB-0005HA-93 for qemu-devel@nongnu.org; Thu, 15 Oct 2015 21:14:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zmtb8-0005A3-1w for qemu-devel@nongnu.org; Thu, 15 Oct 2015 21:14:21 -0400 Received: from mail-pa0-x236.google.com ([2607:f8b0:400e:c03::236]:32952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zmtb7-00059X-Se for qemu-devel@nongnu.org; Thu, 15 Oct 2015 21:14:17 -0400 Received: by pabrc13 with SMTP id rc13so103182835pab.0 for ; Thu, 15 Oct 2015 18:14:17 -0700 (PDT) Sender: Richard Henderson References: <1444774253-10492-1-git-send-email-rth@twiddle.net> <561EC2FA.40901@twiddle.net> From: Richard Henderson Message-ID: <56204F63.6010501@twiddle.net> Date: Fri, 16 Oct 2015 12:14:11 +1100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] target-*: Advance pc after recognizing a breakpoint List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Sergey Fedorov , QEMU Developers On 10/16/2015 03:36 AM, Peter Maydell wrote: > On 14 October 2015 at 22:02, Richard Henderson wrote: >> On 10/15/2015 06:34 AM, Peter Maydell wrote: >>> >>> This is still the same cryptic comment we have in the >>> targets which do do this. Can we have something >>> that is a bit more explanatory about what is going on and >>> why we need to do this, please? >> >> >> Suggestions? > > ...well, I don't entirely understand the problem it's > fixing, which is why I'm asking for a better comment :-) Heh. Fair enough. How about /* The address covered by the breakpoint must be included in [tb->pc, tb->pc + tb->size) in order to for it to be properly cleared -- thus we increment the PC here so that the logic setting tb->size below does the right thing. */ There are two edge cases that cause the problem with clearing that could be described, but I think that the comment becomes too bulky, as well as confuses the situation for someone cutting-and-pasting the logic to a new port. r~