Re: watch exception only for kseg0 addresses..?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 25 Nov 2002, Ralf Baechle wrote:

> The whole watch stuff in the the kernel is pretty much an ad-hoc API
> which I did create to debug a stack overflow.  I'm sure if you're
> going to use it you'll find problems.  For userspace for example you'd
> have to switch the watch register when switching the MMU context so
> each process gets it's own virtual watch register.  Beyond that there
> are at least two different formats of watch registers implemented in
> actual silicon, the original R4000-style and the MIPS32/MIPS64 style
> watch registers and the kernel's watch code only know the R4000 style
> one.  So check your CPU's manual ...

 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).

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux