powerpc/hw-breakpoint: Use generic hw-breakpoint interfaces for new PPC ptrace flags
authorK.Prasad <prasad@linux.vnet.ibm.com>
Sun, 28 Oct 2012 15:13:15 +0000 (15:13 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 15 Nov 2012 02:00:23 +0000 (13:00 +1100)
commit6c7a2856ade6a58c20038024247d16a12a8d2323
tree87d43dc2aeaded2c7d9cc9faaa2ce326334f2360
parent16b86bf2520ed29712ca7462dbfe76c856b445e9
powerpc/hw-breakpoint: Use generic hw-breakpoint interfaces for new PPC ptrace flags

PPC_PTRACE_GETHWDBGINFO, PPC_PTRACE_SETHWDEBUG and PPC_PTRACE_DELHWDEBUG are
PowerPC specific ptrace flags that use the watchpoint register. While they are
targeted primarily towards BookE users, user-space applications such as GDB
have started using them for BookS too. This patch enables the use of generic
hardware breakpoint interfaces for these new flags.

Apart from the usual benefits of using generic hw-breakpoint interfaces, these
changes allow debuggers (such as GDB) to use a common set of ptrace flags for
their watchpoint needs and allow more precise breakpoint specification (length
of the variable can be specified).

Mikey added: rebased and added dbginfo.features around #ifdef
             CONFIG_HAVE_HW_BREAKPOINT

Signed-off-by: K.Prasad <prasad@linux.vnet.ibm.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Documentation/powerpc/ptrace.txt
arch/powerpc/kernel/ptrace.c