Re: [PATCH 2/2] [PowerPC Book3E] Introduce new ptrace debug feature flag
From: David Gibson <hidden>
Date: 2011-09-19 02:46:03
On Tue, Aug 30, 2011 at 09:27:41PM -0300, Thiago Jung Bauermann wrote:
On Fri, 2011-08-26 at 14:41 +1000, David Gibson wrote:quoted
On Wed, Aug 24, 2011 at 09:41:43PM -0300, Thiago Jung Bauermann wrote:quoted
On Wed, 2011-08-24 at 14:00 +1000, David Gibson wrote:quoted
On Tue, Aug 23, 2011 at 02:57:56PM +0530, K.Prasad wrote:quoted
On Tue, Aug 23, 2011 at 03:09:31PM +1000, David Gibson wrote:quoted
On Fri, Aug 19, 2011 at 01:23:38PM +0530, K.Prasad wrote:quoted
While PPC_PTRACE_SETHWDEBUG ptrace flag in PowerPC accepts PPC_BREAKPOINT_MODE_EXACT mode of breakpoint, the same is not intimated to the user-space debuggers (like GDB) who may want to use it. Hence we introduce a new PPC_DEBUG_FEATURE_DATA_BP_EXACT flag which will be populated on the "features" member of "struct ppc_debug_info" to advertise support for the same on Book3E PowerPC processors.I thought the idea was that the BP_EXACT mode was the default - if the new interface was supported at all, then BP_EXACT was always supported. So, why do you need a new flag?Yes, BP_EXACT was always supported but not advertised through PPC_PTRACE_GETHWDBGINFO. We're now doing that.I can see that. But you haven't answered why.BookS doesn't support BP_EXACT, that's why I suggested this flag.Surely you can support it with exactly the same sort of filtering you're using for the 8-byte ranges now?Yes, but to detect that the processor doesn't support BP_EXACT in hardware I'd have to send a ptrace request, and have it rejected. Only then I'd step back and simulate one with ranges. Considering that it's easy and backwards compatible to add a new flag to signal that BP_EXACT is not supported, I don't know why it would be better to go with the more convoluted process.
No, I'm saying why not implement BP_EXACT on server. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson