Change breakpoints to use value_ref_ptr
authorTom Tromey <tom@tromey.com>
Tue, 3 Apr 2018 23:58:58 +0000 (17:58 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 6 Apr 2018 21:44:47 +0000 (15:44 -0600)
commit850645cfe82f5854af90ce73f2056712e20fcea2
tree0d9a576e15bafdc37e68f6c3ca8e6a928f93e824
parent22bc8444e6d377fd016253926c2a2597ff944842
Change breakpoints to use value_ref_ptr

Now that value_ref_ptr exists, it is possible to simplify breakpoint
and bpstat memory management by using a value_ref_ptr rather than
manually handling the reference counts.

gdb/ChangeLog
2018-04-06  Tom Tromey  <tom@tromey.com>

* value.c (release_value): Update.
* breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
(struct bpstats) <val>: Now a value_ref_ptr.
* breakpoint.c (update_watchpoint, breakpoint_init_inferior)
(~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
(~watchpoint, print_it_watchpoint, watch_command_1)
(invalidate_bp_value_on_memory_change): Update.
gdb/ChangeLog
gdb/breakpoint.c
gdb/breakpoint.h
gdb/value.c