aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorK.Prasad <prasad@linux.vnet.ibm.com>2012-05-10 18:43:38 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-05-13 20:48:55 -0400
commit1b788400bbcbfe25280dc0b8000d2142bfe3be3b (patch)
tree2601bdf294a99f2aa03615b67dcc7ceb4750a666 /Documentation
parent404e32e4a8f68d218b73b7db7bb831d887ab6046 (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). 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>
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