From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23133 invoked by alias); 7 Sep 2008 00:35:23 -0000 Received: (qmail 23123 invoked by uid 22791); 7 Sep 2008 00:35:23 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.113.40.141) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 07 Sep 2008 00:34:47 +0000 Received: from mailhost5.vmware.com (mailhost5.vmware.com [10.16.68.131]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id BE24B6996; Sat, 6 Sep 2008 17:34:45 -0700 (PDT) Received: from [10.20.92.218] (promb-2s-dhcp218.eng.vmware.com [10.20.92.218]) by mailhost5.vmware.com (Postfix) with ESMTP id 98C0EDC0AE; Sat, 6 Sep 2008 17:34:45 -0700 (PDT) Message-ID: <48C32177.6060507@vmware.com> Date: Sun, 07 Sep 2008 00:35:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Jason Molenda , Michael Snyder , "gdb@sourceware.org" Subject: Re: [remote protocol] step range? References: <48C05DAF.3070705@vmware.com> <61DDBF42-6D9B-4E8C-9B0C-CB9BB68F5F11@apple.com> <48C09B98.3010506@vmware.com> <693D921E-42E7-474A-9DCB-82FAA2DE3679@apple.com> <20080906041540.GA10729@caradoc.them.org> In-Reply-To: <20080906041540.GA10729@caradoc.them.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-09/txt/msg00041.txt.bz2 Daniel Jacobowitz wrote: > On Fri, Sep 05, 2008 at 05:16:15PM -0700, Jason Molenda wrote: >> For what it's worth we use the remote protocol for debugging applications >> on the iPhone / iPod Touch devices. When we first got it up and running, >> we saw command-line level "step" commands taking multiple (4-5!) seconds >> to complete. We optimized it to no end and got this down to something >> like .2 seconds without doing anything too weird to the protocol. We >> didn't have any single-instruction-step feature so we didn't even consider >> trying to push range-stepping down to the device. > > I find this somewhat surprising - you don't need nearly as much of a > disassembler to do this for ARM as it sounds like from your comments. > I've written the code at least twice now, and for pre-Thumb-2 targets > it's quite straightforward. And it saves enough round trips to be > a win, as long as you have somewhere closer to the target that can run > it. > >> Since we've established that you must have single-instruction-step >> capability in the target to do this, I think it's safe to assume that >> only the current continue thread will execute. > > Well, in hosted environments the hardware single step bit is often > context-switched; e.g. %eflags. Or in multi-core systems there may > actually be one per 'thread'. Well you know, guys, it's always optional for a target to implement a new protocol command. If there's a target for which this would be hard, or wouldn't gain you much, you can always leave it un-implemented.