[Top] [All Lists]

Re: watch exception only for kseg0 addresses..?

To: Daniel Jacobowitz <>
Subject: Re: watch exception only for kseg0 addresses..?
From: "Maciej W. Rozycki" <>
Date: Mon, 25 Nov 2002 16:30:13 +0100 (MET)
Cc: Ralf Baechle <>, atul srivastava <>,
In-reply-to: <>
Organization: Technical University of Gdansk
Original-recipient: rfc822;
On Mon, 25 Nov 2002, Daniel Jacobowitz wrote:

> >  I think the best use of the watch exception would be making it available
> > to userland via PTRACE_PEEKUSR and PTRACE_POKEUSR for hardware watchpoint
> > support (e.g. for gdb).  Hardware support is absolutely necessary for
> > watching read accesses and much beneficial for write ones (otherwise gdb
> > single-steps code which sucks performace-wise).
> (Although that isn't necessary; page-protection watchpoints are on my
> TODO for next year.  They aren't quite as efficient as hardware
> watchpoints but they don't require hardware support either, just an
> MMU.)

 As a fallback the approach is just fine, but doesn't is suck
performance-wise for watchpoints at the stack?  It certainly sucks for
instruction fetches.  While gdb doesn't seem to use hardware breakpoints
as they are only really necessary for ROMs, other software may want to
(well, gdb too, one day). 

> In any case, yes, the thing to do is choose an API for these and expose
> them via ptrace; not necessarily in PEEKUSER though.  There's no cost
> to adding new PTRACE_* ops.

 Sure, as long as common sense is applied.

+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+        e-mail:, PGP key available        +

<Prev in Thread] Current Thread [Next in Thread>