ppc_set_hwdebug vs ptrace_set_debugreg

Andreas Schwab schwab at linux-m68k.org
Tue Dec 14 06:05:36 EST 2010


"K.Prasad" <prasad at linux.vnet.ibm.com> writes:

> +#ifdef CONFIG_HAVE_HW_BREAKPOINT
> +	/* Create a new breakpoint request if one doesn't exist already */
> +	hw_breakpoint_init(&attr);
> +	attr.bp_addr = bp_info->addr & ~HW_BREAKPOINT_ALIGN;
> +	arch_bp_generic_fields(bp_info->addr &
> +				(DABR_DATA_WRITE | DABR_DATA_READ),
> +							&attr.bp_type);
> +
> +	bp = register_user_hw_breakpoint(&attr, ptrace_triggered, task);
> +	if (IS_ERR(bp))
> +		return PTR_ERR(bp);
> +
> +	child->thread.ptrace_bps[0] = bp;
> +#endif /* CONFIG_HAVE_HW_BREAKPOINT */
> +
>  	child->thread.dabr = (unsigned long)bp_info->addr;

That cannot work, see
<http://permalink.gmane.org/gmane.linux.ports.ppc64.devel/71418>.

Andreas.

-- 
Andreas Schwab, schwab at linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


More information about the Linuxppc-dev mailing list