aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-08-16 19:19:22 +0000
committerTom Tromey <tromey@redhat.com>2010-08-16 19:19:22 +0000
commit06a64a0b786b2a3b81e8caced730c43939a78684 (patch)
tree22ac5c9f0c04439265692f65f990b3de634fd685 /gdb/doc
parent70ebf4ed1a2872d940df413696837481871a5af9 (diff)
downloadgdb-06a64a0b786b2a3b81e8caced730c43939a78684.zip
gdb-06a64a0b786b2a3b81e8caced730c43939a78684.tar.gz
gdb-06a64a0b786b2a3b81e8caced730c43939a78684.tar.bz2
gdb
* value.c (release_value): Clear 'next' pointer. * breakpoint.c (watch_command_1): Add 'just_location' argument. (watch_command_wrapper): Update. (watch_maybe_just_location): New function. (watch_command): Update. (rwatch_command_wrapper): Update. (rwatch_command): Update. (awatch_command_wrapper): Update. (awatch_command): Update. (check_for_argument): New function. (_initialize_breakpoint): Update help text. gdb/testsuite * gdb.base/help.exp: Update. * gdb.base/watchpoint.exp (test_watchpoint_and_breakpoint): Delete watchpoint. (test_watch_location): New proc. (test_watchpoint_in_big_blob): Delete watchpoint. * gdb.base/watchpoint.c (func5): New function. (main): Call it. gdb/doc * gdb.texinfo (Set Watchpoints): Document -location option.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog4
-rw-r--r--gdb/doc/gdb.texinfo15
2 files changed, 16 insertions, 3 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index b8f060b..36099c2 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,7 @@
+2010-08-16 Tom Tromey <tromey@redhat.com>
+
+ * gdb.texinfo (Set Watchpoints): Document -location option.
+
2010-08-13 Doug Evans <dje@google.com>
* gdb.texinfo (.debug_gdb_scripts section): Fix typo.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index cd3ac0f..fa50761 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -3711,7 +3711,7 @@ watchpoints, which do not slow down the running of your program.
@table @code
@kindex watch
-@item watch @var{expr} @r{[}thread @var{threadnum}@r{]}
+@item watch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@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
@@ -3728,13 +3728,22 @@ change the value of @var{expr}, @value{GDBN} will not break. Note
that watchpoints restricted to a single thread in this way only work
with Hardware Watchpoints.
+Ordinarily a watchpoint respects the scope of variables in @var{expr}
+(see below). The @code{-location} argument tells @value{GDBN} to
+instead watch the memory referred to by @var{expr}. In this case,
+@value{GDBN} will evaluate @var{expr}, take the address of the result,
+and watch the memory at that address. The type of the result is used
+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.
+
@kindex rwatch
-@item rwatch @var{expr} @r{[}thread @var{threadnum}@r{]}
+@item rwatch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]}
Set a watchpoint that will break when the value of @var{expr} is read
by the program.
@kindex awatch
-@item awatch @var{expr} @r{[}thread @var{threadnum}@r{]}
+@item awatch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]}
Set a watchpoint that will break when @var{expr} is either read from
or written into by the program.