David VomLehn wrote:
David Daney wrote:
To follow is my fifth pass at MIPS watch register support.
I'd like to add a feature request, understanding fully that the response
may very well be, "interesting idea, now show us a patch"--can we have
an interface that would allow kernel-space allocation of watchpoint
The rationale is that we have found it quite useful to have kernel and
driver code set watchpoints for debugging purposes. I would not expect
that kernel space code could grab watchpoint registers already in use by
ptrace, and that ptrace would be free to allocate all watchpoint
registers not in use for kernel space purposes, i.e. there would be no
watchpoint registers permanently allocated for kernel space usage.
The current patch has an artificial limit of 4 registers that it would use.
I think adding this feature would be possible, but would rather make it
part of a follow-on patch.
You would limit the number of registers available to ptrace and then
handle the others specially in the do_watch handler.