From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8773 invoked by alias); 29 Jan 2010 04:25:01 -0000 Received: (qmail 8761 invoked by uid 22791); 29 Jan 2010 04:24:59 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 29 Jan 2010 04:24:55 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 194962BABDC for ; Thu, 28 Jan 2010 23:24:54 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id yIl4UxdHh3Ry for ; Thu, 28 Jan 2010 23:24:54 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 79B602BABDB for ; Thu, 28 Jan 2010 23:24:53 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id B2714F59A0; Fri, 29 Jan 2010 08:24:31 +0400 (RET) Date: Fri, 29 Jan 2010 04:25:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: Re: [patch/ARM] Add support for single-stepping through IF-THEN blocks Message-ID: <20100129042431.GD26827@adacore.com> References: <20100128224044.GF2813@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100128224044.GF2813@caradoc.them.org> User-Agent: Mutt/1.5.20 (2009-06-14) 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 X-SW-Source: 2010-01/txt/msg00632.txt.bz2 > Here's the patch I was ultimately working on that produced the rest of > today's cleanups. This is really interesting! Thanks for taking the time to document the patches - I try to do the same and I think it's really useful when someone comes back to a piece of code and tries to understand it (I have trouble rememebering what I did a couple of days ago, so it's my own notes are very helpful to me too! ;-) ). There is one thing that I didn't quite get, and the comments in the code repeat the same thing: > cmp r0, r1 @ Compare r0 and r1 > ittee eq @ If they are equal > moveq r0, #1 @ Then do this > moveq r1, #1 @ And this > movne r0, #2 @ Otherwise this > movne r1, #2 @ And this [...] > 1) We use an undefined instruction, rather than the architectural BKPT > instruction, as the GNU/Linux software breakpoint. If a hardware > debugger is connected to the system, BKPT will trigger it. I don't understand why we cannot use the BKPT insn... Suppose we put a BKPT at the beginning of each block, what would happen? Would we get a SIGTRAP even if the insn wasn't supposed to be called? -- Joel