This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: [remote protocol] step range?
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'.
--
Daniel Jacobowitz
CodeSourcery