ppc_set_hwdebug vs ptrace_set_debugreg
prasad at linux.vnet.ibm.com
Mon Nov 29 18:22:33 EST 2010
On Sat, Nov 27, 2010 at 08:36:30PM +0100, Andreas Schwab wrote:
> Why does ptrace_set_debugreg call register_user_hw_breakpoint, but
> ppc_set_hwdebug doesn't? Shouldn't ppc_set_hwdebug set the
> DABR_DATA_(READ|WRITE|TRANSLATION) bits in the dabr?
The hw-breakpoint interfaces were initially planned for the old ptrace
option PTRACE_SET_DEBUGREG,while, the newer ptrace options are mostly
to exploit the advanced debug features of Book3E processors.
Although ppc_set_hwdebug() can set DABR through set_dabr() in
arch/powerpc/kernel/process.c, it is good to have it converted to use
register_user_hw_breakpoint(). This was planned to be done alongside the
conversion of all ptrace options enabled by CONFIG_PPC_ADV_DEBUG_REGS,
which is yet to be done.
Are you looking to use debug registers through perf, or somesuch, that
you need register_user_hw_breakpoint() to be used for these new ptrace
More information about the Linuxppc-dev