aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorThiago Jung Bauermann <bauerman@br.ibm.com>2011-05-06 18:46:33 +0000
committerThiago Jung Bauermann <bauerman@br.ibm.com>2011-05-06 18:46:33 +0000
commit9c06b0b4285bf0abffaa37bda5b4bf686691d805 (patch)
tree8dbb1651e667706adfca09deab5149071b392496 /gdb/doc
parentd472a4264b2208644fad65766532806e01c5fba7 (diff)
downloadgdb-9c06b0b4285bf0abffaa37bda5b4bf686691d805.zip
gdb-9c06b0b4285bf0abffaa37bda5b4bf686691d805.tar.gz
gdb-9c06b0b4285bf0abffaa37bda5b4bf686691d805.tar.bz2
2011-05-06 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
Thiago Jung Bauermann <bauerman@br.ibm.com> Implement support for PowerPC BookE masked watchpoints. gdb/ * NEWS: Mention masked watchpoint support. Create "Changed commands" section. * breakpoint.h (struct breakpoint_ops) <works_in_software_mode>: New method. Initialize to NULL in all existing breakpoint_ops instances. (struct breakpoint) <hw_wp_mask>: New field. * breakpoint.c (is_masked_watchpoint): Add prototype. (update_watchpoint): Don't set b->val for masked watchpoints. Call breakpoint's breakpoint_ops.works_in_software_mode if available. (watchpoints_triggered): Handle the case of a hardware masked watchpoint trigger. (watchpoint_check): Likewise. (works_in_software_mode_watchpoint): New function. (insert_masked_watchpoint, remove_masked_watchpoint) (resources_needed_masked_watchpoint) (works_in_software_mode_masked_watchpoint, print_it_masked_watchpoint) (print_one_detail_masked_watchpoint, print_mention_masked_watchpoint) (print_recreate_masked_watchpoint, is_masked_watchpoint): New functions. (masked_watchpoint_breakpoint_ops): New structure. (watch_command_1): Check for the existence of the `mask' parameter. Set b->ops according to the type of hardware watchpoint being created. * ppc-linux-nat.c (ppc_linux_insert_mask_watchpoint) (ppc_linux_remove_mask_watchpoint) (ppc_linux_masked_watch_num_registers): New functions. (_initialize_ppc_linux_nat): Initialize to_insert_mask_watchpoint, to_remove_mask_watchpoint and to_masked_watch_num_registers. * target.c (update_current_target): Mention to_insert_mask_watchpoint, to_remove_mask_watchpoint, and to_masked_watch_num_registers. (target_insert_mask_watchpoint, target_remove_mask_watchpoint) (target_masked_watch_num_registers): New functions. * target.h (struct target_ops) <to_insert_mask_watchpoint>, <to_remove_mask_watchpoint>, <to_masked_watch_num_registers>: New methods. (target_insert_mask_watchpoint, target_remove_mask_watchpoint) (target_masked_watch_num_registers): Add prototypes. gdb/doc/ * gdb.texinfo (Set Watchpoints): Document mask parameter. (PowerPC Embedded): Mention support of masked watchpoints.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog7
-rw-r--r--gdb/doc/gdb.texinfo28
2 files changed, 31 insertions, 4 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index d7e610d..2eacb32 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,10 @@
+2011-05-06 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
+ Thiago Jung Bauermann <bauerman@br.ibm.com>
+
+ Implement support for PowerPC BookE masked watchpoints.
+ * gdb.texinfo (Set Watchpoints): Document mask parameter.
+ (PowerPC Embedded): Mention support of masked watchpoints.
+
2011-05-03 Joel Brobecker <brobecker@adacore.com>
* gdb.texinfo (In Memoriam): Replace litteral uses of `GDB' with
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 0ac5672..3618b70 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -3725,7 +3725,7 @@ watchpoints, which do not slow down the running of your program.
@table @code
@kindex watch
-@item watch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]}
+@item watch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]} @r{[}mask @var{maskvalue}@r{]}
Set a watchpoint for an expression. @value{GDBN} will break when the
expression @var{expr} is written into by the program and its value
changes. The simplest (and the most popular) use of this command is
@@ -3736,7 +3736,7 @@ to watch the value of a single variable:
@end smallexample
If the command includes a @code{@r{[}thread @var{threadnum}@r{]}}
-clause, @value{GDBN} breaks only when the thread identified by
+argument, @value{GDBN} breaks only when the thread identified by
@var{threadnum} changes the value of @var{expr}. If any other threads
change the value of @var{expr}, @value{GDBN} will not break. Note
that watchpoints restricted to a single thread in this way only work
@@ -3751,13 +3751,30 @@ to determine the size of the watched memory. If the expression's
result does not have an address, then @value{GDBN} will print an
error.
+The @code{@r{[}mask @var{maskvalue}@r{]}} argument allows creation
+of masked watchpoints, if the current architecture supports this
+feature (e.g., PowerPC Embedded architecture, see @ref{PowerPC
+Embedded}.) A @dfn{masked watchpoint} specifies a mask in addition
+to an address to watch. The mask specifies that some bits of an address
+(the bits which are reset in the mask) should be ignored when matching
+the address accessed by the inferior against the watchpoint address.
+Thus, a masked watchpoint watches many addresses simultaneously---those
+addresses whose unmasked bits are identical to the unmasked bits in the
+watchpoint address. The @code{mask} argument implies @code{-location}.
+Examples:
+
+@smallexample
+(@value{GDBP}) watch foo mask 0xffff00ff
+(@value{GDBP}) watch *0xdeadbeef mask 0xffffff00
+@end smallexample
+
@kindex rwatch
-@item rwatch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]}
+@item rwatch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]} @r{[}mask @var{maskvalue}@r{]}
Set a watchpoint that will break when the value of @var{expr} is read
by the program.
@kindex awatch
-@item awatch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]}
+@item awatch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]} @r{[}mask @var{maskvalue}@r{]}
Set a watchpoint that will break when @var{expr} is either read from
or written into by the program.
@@ -18780,6 +18797,9 @@ region using one of the following commands (@pxref{Expressions}):
(@value{GDBP}) watch @{char[@var{length}]@} @var{address}
@end smallexample
+PowerPC embedded processors support masked watchpoints. See the discussion
+about the @code{mask} argument in @ref{Set Watchpoints}.
+
@cindex ranged breakpoint
PowerPC embedded processors support hardware accelerated
@dfn{ranged breakpoints}. A ranged breakpoint stops execution of