32-bit Thumb-2 breakpoints

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Feb 3 09:43:20 EST 2010


On Wed, Feb 03, 2010 at 08:48:22AM -0500, Daniel Jacobowitz wrote:
> On Wed, Feb 03, 2010 at 01:28:24PM +0000, Russell King - ARM Linux wrote:
> > Software breakpoints are a pain in the backside if you have threaded
> > programs, because when you insert a breakpoint into one thread, it's
> > active in all threads - you can't insert a breakpoint into only one
> > thread.
> > 
> > If we have the ability to set hardware breakpoints, I'd like to see
> > that used in preference to software breakpoints, and only resort to
> > software breakpoints if there's no other alternative.
> 
> GDB has quite good support for this platform-independent problem,
> not to mention that it's sometimes a feature.  I don't think it's a
> problem.  The latest addition is displaced stepping support,
> available for ARM, which is used to bypass software breakpoints
> hit by an uninteresting thread without having to stop the rest
> of the program.

You should be aware that there has been a move to rid the kernel of
software-based breakpointing implementations through 'utrace' which
I've been more or less ignoring because of that (because it means
that we lose the ability to set any breakpoints.)

Just to be clear, I'm not objecting to your patch (which I think is
fine) - I'm just trying to make sure that the same ground isn't being
covered in multiple ways by different people.



More information about the linux-arm-kernel mailing list