aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorThiago Jung Bauermann <bauerman@br.ibm.com>2011-01-11 19:23:03 +0000
committerThiago Jung Bauermann <bauerman@br.ibm.com>2011-01-11 19:23:03 +0000
commite09342b536073e978e30460267e144063843cd17 (patch)
tree4b5abae529e18768c8f16fcb74a528a8353e73f4 /gdb/doc
parent9fa40276f0a747e238e608672231ec28fa614619 (diff)
downloadgdb-e09342b536073e978e30460267e144063843cd17.zip
gdb-e09342b536073e978e30460267e144063843cd17.tar.gz
gdb-e09342b536073e978e30460267e144063843cd17.tar.bz2
2011-01-11 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
Thiago Jung Bauermann <bauerman@br.ibm.com> Implement support for PowerPC BookE ranged watchpoints. gdb/ * breakpoint.h (struct breakpoint_ops) <resources_needed>: New method. Initialize to NULL in all existing breakpoint_ops instances. (struct breakpoint) <exact>: New field. (target_exact_watchpoints): Declare external global. * breakpoint.c (target_exact_watchpoints): New global flag. (update_watchpoint): Set b->type to bp_hardware_watchpoint and b->enable_state to bp_enabled before calling hw_watchpoint_used_count. (hw_watchpoint_used_count): Iterate over all bp_locations in a watchpoint. Call breakpoint's breakpoint_ops.resources_needed if available. (insert_watchpoint, remove_watchpoint): Use fixed length of 1 byte if the watchpoint is exact. (resources_needed_watchpoint): New function. (watchpoint_breakpoint_ops): Add resources_needed_watchpoint. (watch_command_1): Set b->exact if the user asked for an exact watchpoint and one can be set. (can_use_hardware_watchpoint): Add exact_watchpoints argument. Pass fixed length of 1 to target_region_ok_for_hw_watchpoint if the user asks for an exact watchpoint and one can be set. Return number of needed debug registers to watch the expression. * gdbtypes.c (is_scalar_type): New function, based on valprint.c:scalar_type_p. (is_scalar_type_recursive): New function. * gdbtypes.h (is_scalar_type_recursive): Declare. * ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint): Always handle regions when ranged watchpoints are available. (create_watchpoint_request): New function. (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint): Use create_watchpoint_request. * rs6000-tdep.c (show_powerpc_exact_watchpoints): New function. (_initialize_rs6000_tdep): Add `exact-watchpoints' boolean to the `set powerpc' and `show powerpc' commands. * target.h (struct target_ops) <to_region_ok_for_hw_watchpoint>: Mention documentation comment in the target macro. (target_region_ok_for_hw_watchpoint): Document return value. gdb/doc/ * gdb.texinfo (PowerPC Embedded): Document ranged watchpoints and the "set powerpc exact-watchpoints" flag.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog9
-rw-r--r--gdb/doc/gdb.texinfo28
2 files changed, 33 insertions, 4 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index d5f89b2..a64db4c 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,10 @@
+2011-01-11 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
+ Thiago Jung Bauermann <bauerman@br.ibm.com>
+
+ Implement support for PowerPC BookE ranged watchpoints.
+ * gdb.texinfo (PowerPC Embedded): Document ranged watchpoints and
+ the "set powerpc exact-watchpoints" flag.
+
2011-01-07 Tom Tromey <tromey@redhat.com>
* gdb.texinfo (Python API): Add descriptions to @menu items.
@@ -8,7 +15,7 @@
2010-01-06 Paul Pluzhnikov <ppluzhnikov@google.com>
- * gdb.texinfo (Debugging Output): Document "set debug jit".
+ * gdb.texinfo (Debugging Output): Document "set debug jit".
2011-01-06 Tom Tromey <tromey@redhat.com>
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 7f8c785..8e42913 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -18721,9 +18721,25 @@ implement in hardware simple hardware watchpoint conditions of the form:
if @var{ADDRESS|VARIABLE} == @var{CONSTANT EXPRESSION}
@end smallexample
-The DVC register will be automatically used whenever @value{GDBN} detects
-such pattern in a condition expression. This feature is available in native
-@value{GDBN} running on a Linux kernel version 2.6.34 or newer.
+The DVC register will be automatically used when @value{GDBN} detects
+such pattern in a condition expression, and the created watchpoint uses one
+debug register (either the @code{exact-watchpoints} option is on and the
+variable is scalar, or the variable has a length of one byte). This feature
+is available in native @value{GDBN} running on a Linux kernel version 2.6.34
+or newer.
+
+When running on PowerPC embedded processors, @value{GDBN} automatically uses
+ranged hardware watchpoints, unless the @code{exact-watchpoints} option is on,
+in which case watchpoints using only one debug register are created when
+watching variables of scalar types.
+
+You can create an artificial array to watch an arbitrary memory
+region using one of the following commands (@pxref{Expressions}):
+
+@smallexample
+(@value{GDBP}) watch *((char *) @var{address})@@@var{length}
+(@value{GDBP}) watch @{char[@var{length}]@} @var{address}
+@end smallexample
@value{GDBN} provides the following PowerPC-specific commands:
@@ -18744,6 +18760,12 @@ arguments and return values. The valid options are @samp{auto};
registers. By default, @value{GDBN} selects the calling convention
based on the selected architecture and the provided executable file.
+@item set powerpc exact-watchpoints
+@itemx show powerpc exact-watchpoints
+Allow @value{GDBN} to use only one debug register when watching a variable
+of scalar type, thus assuming that the variable is accessed through the
+address of its first byte.
+
@kindex target dink32
@item target dink32 @var{dev}
DINK32 ROM monitor.