[Top] [All Lists]

Re: Patch 0/6] MIPS: Hardware watch register support for gdb (version 5)

To: David VomLehn <>
Subject: Re: Patch 0/6] MIPS: Hardware watch register support for gdb (version 5).
From: David Daney <>
Date: Tue, 23 Sep 2008 12:02:35 -0700
In-reply-to: <>
Original-recipient: rfc822;
References: <> <>
User-agent: Thunderbird (X11/20080723)
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 registers?

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.

David Daney

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