Change counted_command_line to a shared_ptr
authorTom Tromey <tom@tromey.com>
Tue, 22 Aug 2017 03:51:11 +0000 (21:51 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 21 Sep 2017 04:05:16 +0000 (22:05 -0600)
commitd1b0a7bfd3df05fd2009b62b19b7535bbc6555c0
tree5e3f5adeb00c1fcc0bcde2994c29f925f98c1d25
parent48649e1bfe2ef4cceff15a34e5a9e37201894ecd
Change counted_command_line to a shared_ptr

This changes counted_command_line to be a typedef for std::shared_ptr
and removes the associated cleanups.  In the long run I believe that
cmd_list_element should also be changed to use a shared_ptr.

gdb/ChangeLog
2017-09-20  Tom Tromey  <tom@tromey.com>

* breakpoint.c (struct counted_command_line): Remove.
(breakpoint_commands): Update.
(alloc_counted_command_line, incref_counted_command_line)
(decref_counted_command_line, do_cleanup_counted_command_line)
(make_cleanup_decref_counted_command_line): Remove.
(breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
(bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
(bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
(save_breakpoints): Update.
* breakpoint.h (counted_command_line): Now a typedef to
shared_ptr.
(struct breakpoint) <commands>: Now a counted_command_line.
(struct bpstats) <command>: Likewise.
gdb/ChangeLog
gdb/breakpoint.c
gdb/breakpoint.h