aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorK.Prasad <prasad@linux.vnet.ibm.com>2012-10-28 11:13:15 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-11-14 21:00:23 -0500
commit6c7a2856ade6a58c20038024247d16a12a8d2323 (patch)
tree87d43dc2aeaded2c7d9cc9faaa2ce326334f2360 /Documentation
parent16b86bf2520ed29712ca7462dbfe76c856b445e9 (diff)
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>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/powerpc/ptrace.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/Documentation/powerpc/ptrace.txt b/Documentation/powerpc/ptrace.txt
index f4a5499b7bc6..f2a7a3919772 100644
--- a/Documentation/powerpc/ptrace.txt
+++ b/Documentation/powerpc/ptrace.txt
@@ -127,6 +127,22 @@ Some examples of using the structure to:
127 p.addr2 = (uint64_t) end_range; 127 p.addr2 = (uint64_t) end_range;
128 p.condition_value = 0; 128 p.condition_value = 0;
129 129
130- set a watchpoint in server processors (BookS)
131
132 p.version = 1;
133 p.trigger_type = PPC_BREAKPOINT_TRIGGER_RW;
134 p.addr_mode = PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE;
135 or
136 p.addr_mode = PPC_BREAKPOINT_MODE_EXACT;
137
138 p.condition_mode = PPC_BREAKPOINT_CONDITION_NONE;
139 p.addr = (uint64_t) begin_range;
140 /* For PPC_BREAKPOINT_MODE_RANGE_INCLUSIVE addr2 needs to be specified, where
141 * addr2 - addr <= 8 Bytes.
142 */
143 p.addr2 = (uint64_t) end_range;
144 p.condition_value = 0;
145
1303. PTRACE_DELHWDEBUG 1463. PTRACE_DELHWDEBUG
131 147
132Takes an integer which identifies an existing breakpoint or watchpoint 148Takes an integer which identifies an existing breakpoint or watchpoint