aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2005-04-02 08:32:31 +0000
committerEli Zaretskii <eliz@gnu.org>2005-04-02 08:32:31 +0000
commit82f2d80296f1ea50009329b450386739a382042e (patch)
tree3f068d7e2e118badab04006e48ae9c264e1202ad /gdb/doc
parent0c98cc2b815b97889f89c397a0e91121eefd1b71 (diff)
downloadgdb-82f2d80296f1ea50009329b450386739a382042e.zip
gdb-82f2d80296f1ea50009329b450386739a382042e.tar.gz
gdb-82f2d80296f1ea50009329b450386739a382042e.tar.bz2
(Set Watchpoints): Document can-use-hw-watchpoints.
Rearrange index entries and improve wording about support for hardware watchpoints.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog6
-rw-r--r--gdb/doc/gdb.texinfo23
2 files changed, 22 insertions, 7 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 62bb5e2..94272d1 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,9 @@
+2005-04-01 Eli Zaretskii <eliz@gnu.org>
+
+ * gdb.texinfo (Set Watchpoints): Document can-use-hw-watchpoints.
+ Rearrange index entries and improve wording about support for
+ hardware watchpoints.
+
2005-03-10 Bob Rossi <bob@brasko.net>
* gdb.texinfo: Update copyright
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 97b58f8..1df91d8 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -2741,12 +2741,12 @@ You can see these breakpoints with the @value{GDBN} maintenance command
@subsection Setting watchpoints
@cindex setting watchpoints
-@cindex software watchpoints
-@cindex hardware watchpoints
You can use a watchpoint to stop execution whenever the value of an
expression changes, without having to predict a particular place where
this may happen.
+@cindex software watchpoints
+@cindex hardware watchpoints
Depending on your system, watchpoints may be implemented in software or
hardware. @value{GDBN} does software watchpointing by single-stepping your
program and testing the variable's value each time, which is hundreds of
@@ -2754,10 +2754,9 @@ times slower than normal execution. (But this may still be worth it, to
catch errors where you have no clue what part of your program is the
culprit.)
-On some systems, such as HP-UX, @sc{gnu}/Linux and some other x86-based targets,
-@value{GDBN} includes support for
-hardware watchpoints, which do not slow down the running of your
-program.
+On some systems, such as HP-UX, @sc{gnu}/Linux and most other
+x86-based targets, @value{GDBN} includes support for hardware
+watchpoints, which do not slow down the running of your program.
@table @code
@kindex watch
@@ -2785,7 +2784,17 @@ watchpoints execute very quickly, and the debugger reports a change in
value at the exact instruction where the change occurs. If @value{GDBN}
cannot set a hardware watchpoint, it sets a software watchpoint, which
executes more slowly and reports the change in value at the next
-statement, not the instruction, after the change occurs.
+@emph{statement}, not the instruction, after the change occurs.
+
+@vindex can-use-hw-watchpoints
+@cindex use only software watchpoints
+You can force @value{GDBN} to use only software watchpoints with the
+@kbd{set can-use-hw-watchpoints 0} command. With this variable set to
+zero, @value{GDBN} will never try to use hardware watchpoints, even if
+the underlying system supports them. (Note that hardware-assisted
+watchpoints that were set @emph{before} setting
+@code{can-use-hw-watchpoints} to zero will still use the hardware
+mechanism of watching expressiion values.)
When you issue the @code{watch} command, @value{GDBN} reports