From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: 32-bit Thumb-2 breakpoints
Date: Wed, 3 Feb 2010 13:28:24 +0000 [thread overview]
Message-ID: <20100203132824.GA27048@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1265197942.1970.34.camel@pc1117.cambridge.arm.com>
On Wed, Feb 03, 2010 at 11:52:22AM +0000, Catalin Marinas wrote:
> On Wed, 2010-02-03 at 00:50 +0000, Daniel Jacobowitz wrote:
> > On Tue, Feb 02, 2010 at 10:43:22PM +0000, Russell King - ARM Linux
> > wrote:
> > > Umm, today there were patches posted using hardware support for
> > > breakpoints / watchpoints. I've not read through those patches
> > > yet, but in light of hardware support, do we really need this patch
> > > anymore?
> >
> > Yes, it's unrelated. Hardware breakpoints are a constrained resource,
> > but we can insert unlimited software breakpoints (and often need to
> > exceed the hardware breakpoint limit).
>
> I agree, we still need support for software breakpoints.
>
> The main benefit of hardware debugging support is for watchpoints.
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.
However, I don't believe the current hardware breakpoint/watchpoint
support is anywhere near up to scratch at present - there seems to be
nothing there which deals with tagging these points with a process ID,
nor does it seem to enable/disable them on any thread switching. So,
(eg) if you install a watchpoint on a virtual address that is used by
the thread being debugged _and_ the debugger (even though they may be
different physical pages), you're going to have the debugger also
trapping.
It might even be the same physical page if it's inside a shared library.
next prev parent reply other threads:[~2010-02-03 13:28 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-11 21:58 32-bit Thumb-2 breakpoints Daniel Jacobowitz
2010-01-11 22:35 ` Russell King - ARM Linux
2010-01-11 22:54 ` Daniel Jacobowitz
2010-01-11 23:10 ` Jamie Lokier
2010-01-11 23:15 ` Russell King - ARM Linux
2010-01-12 0:15 ` Jamie Lokier
2010-01-11 23:17 ` Daniel Jacobowitz
2010-01-12 0:17 ` Jamie Lokier
2010-01-12 0:22 ` Daniel Jacobowitz
2010-02-03 17:23 ` Jamie Lokier
2010-02-03 17:44 ` Daniel Jacobowitz
2010-02-04 22:46 ` Pavel Machek
2010-01-11 23:31 ` Russell King - ARM Linux
2010-01-11 23:51 ` Daniel Jacobowitz
2010-01-12 9:53 ` Catalin Marinas
2010-01-12 10:34 ` Catalin Marinas
2010-01-12 14:25 ` Daniel Jacobowitz
2010-01-28 20:21 ` Daniel Jacobowitz
2010-02-02 22:43 ` Russell King - ARM Linux
2010-02-03 0:50 ` Daniel Jacobowitz
2010-02-03 11:52 ` Catalin Marinas
2010-02-03 13:28 ` Russell King - ARM Linux [this message]
2010-02-03 13:48 ` Daniel Jacobowitz
2010-02-03 14:43 ` Russell King - ARM Linux
2010-02-03 14:56 ` Daniel Jacobowitz
2010-02-03 13:59 ` Jamie Iles
2010-02-03 14:40 ` Russell King - ARM Linux
2010-02-03 15:31 ` Jamie Iles
2010-02-03 16:01 ` Will Deacon
2010-02-03 15:02 ` Matthieu CASTET
2010-02-03 15:04 ` Catalin Marinas
2010-02-03 15:19 ` Nicolas Pitre
2010-02-03 15:19 ` Daniel Jacobowitz
2010-02-03 15:30 ` Russell King - ARM Linux
2010-02-03 15:35 ` Daniel Jacobowitz
2010-02-03 16:35 ` Russell King - ARM Linux
2010-02-03 17:45 ` Daniel Jacobowitz
2010-02-03 15:35 ` Nicolas Pitre
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100203132824.GA27048@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).