Use function_view in a couple of places in breakpoint.c
authorTom Tromey <tom@tromey.com>
Tue, 22 Aug 2017 03:37:45 +0000 (21:37 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 21 Sep 2017 04:05:15 +0000 (22:05 -0600)
commit48649e1bfe2ef4cceff15a34e5a9e37201894ecd
treed6daf0c881ba5e213ecf04b1526b3e3755caacd5
parent04afa70c8e1c931dd44db76eb9f0ddd4949ed00c
Use function_view in a couple of places in breakpoint.c

This changes iterate_over_related_breakpoints and
map_breakpoint_numbers to take a function_view.  Then, it simplifies
the callers by using lambdas.  This then allows the removal of some
bookkeeping types.

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

* breakpoint.c (struct commands_info, do_map_commands_command):
Remove.
(commands_command_1): Update.
(iterate_over_related_breakpoints): Take a function_view.
(do_delete_breakpoint, do_map_delete_breakpoint): Remove.
(delete_command): Update.
(map_breakpoint_numbers): Take a function_view.
(do_disable_breakpoint, do_map_delete_breakpoint): Remove.
(disable_command): Update.
(do_enable_breakpoint, do_map_enable_breakpoint): Remove.
(enable_command): Update.
(struct disp_data, do_enable_breakpoint_disp)
(do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
(do_map_enable_delete_breakpoint): Remove.
(enable_once_command, enable_count_command, enable_delete_command)
(delete_trace_variable_command): Update.
gdb/ChangeLog
gdb/breakpoint.c