summaryrefslogtreecommitdiff
path: root/gdb/breakpoint.h
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2008-03-03 13:24:12 +0000
committerDaniel Jacobowitz <dan@debian.org>2008-03-03 13:24:12 +0000
commite01f75f367c3581bd77062feb02099fd15e07863 (patch)
tree97d92eb2bcba1ae0d28e54097633f12dce41b273 /gdb/breakpoint.h
parentad41e7f40a3c801f9e90569f2092b07646092f3a (diff)
downloadgdb-e01f75f367c3581bd77062feb02099fd15e07863.tar.gz
* breakpoint.c (fetch_watchpoint_value): New function.
(update_watchpoint): Set and clear val_valid. Use fetch_watchpoint_value. Handle unreadable values on the value chain. Correct check for user-requested array watchpoints. (breakpoint_init_inferior): Clear val_valid. (watchpoint_value_print): New function. (print_it_typical): Use it. Do not free or clear old_val. Print watchpoints even if old_val == NULL. (watchpoint_check): Use fetch_watchpoint_value. Check for values becoming readable or unreadable. (watch_command_1): Use fetch_watchpoint_value. Set val_valid. (do_enable_watchpoint): Likewise. * breakpoint.h (struct breakpoint): Update comment for val. Add val_valid. * NEWS: Mention watchpoints on inaccessible memory. * gdb.base/watchpoint.c (global_ptr, func4): New. (main): Call func4. * gdb.base/watchpoint.exp: Call test_inaccessible_watchpoint. (test_inaccessible_watchpoint): New. * gdb.texinfo (Set Watchpoints): Mention watchpoints on unreadable memory. Delete obsolete SPARClite reference.
Diffstat (limited to 'gdb/breakpoint.h')
-rw-r--r--gdb/breakpoint.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 41730c0b311..16bb927c6fb 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -391,8 +391,13 @@ struct breakpoint
/* The largest block within which it is valid, or NULL if it is
valid anywhere (e.g. consists just of global symbols). */
struct block *exp_valid_block;
- /* Value of the watchpoint the last time we checked it. */
+ /* Value of the watchpoint the last time we checked it, or NULL
+ when we do not know the value yet or the value was not
+ readable. VAL is never lazy. */
struct value *val;
+ /* Nonzero if VAL is valid. If VAL_VALID is set but VAL is NULL,
+ then an error occurred reading the value. */
+ int val_valid;
/* Holds the address of the related watchpoint_scope breakpoint
when using watchpoints on local variables (might the concept