Change exceptions.h functions to use gdb::function_view

This changes some functions in exceptions.h to use gdb::function_view,
then fixes up the fallout.  This lead to some surprising places, like
a function pointer in target_so_ops.

While writing this I found that catch_exception_ftype was unused, so I
removed this.

Note that I did not compile the windows-nat.c change, so I don't know
if it works.

Regression tested by the buildbot.

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

	* windows-nat.c (get_windows_debug_event): Update.
	(handle_load_dll): Remove argument.
	* solib-target.c (solib_target_open_symbol_file_object): Change
	type.
	* solib-svr4.c (open_symbol_file_object): Change type.
	* solib-frv.c (open_symbol_file_object): Change type.
	* solib-dsbt.c (open_symbol_file_object): Change type.
	* solib-darwin.c (open_symbol_file_object): Change type.
	* solib-aix.c (solib_aix_open_symbol_file_object): Change type.
	* thread.c (do_captured_list_thread_ids): Remove argument.
	(enum gdb_rc): Update.
	(do_captured_thread_select): Change type.
	(enum gdb_rc): Update.
	* symmisc.c (struct print_symbol_args): Remove.
	(print_symbol): Change type.
	(dump_symtab_1): Update.
	* solib.c (update_solib_list): Update.
	* solist.h (struct target_so_ops) <open_symbol_file_object>:
	Change type.
	* record-full.c (struct record_full_message_args): Remove.
	(record_full_message_wrapper): Remove.
	(record_full_message_wrapper_safe): Update.
	* objc-lang.c (find_objc_msgcall_submethod_helper): Remove.
	(find_objc_msgcall_submethod): Update.
	(struct objc_submethod_helper_data): Remove.
	* main.c (captured_command_loop): Remove parameter.
	(captured_main): Update.
	* infrun.c (hook_stop_stub): Remove.
	(normal_stop): Update.
	(restore_selected_frame): Change type.
	(restore_infcall_control_state): Update.
	* breakpoint.c (bpstat_check_watchpoint)
	(bpstat_check_breakpoint_conditions, gdb_breakpoint_query)
	(struct captured_breakpoint_query_args): Remove.
	(do_captured_breakpoint_query): Change type.
	(breakpoint_re_set): Update.
	* symfile-mem.c (add_vsyscall_page): Update.
	* remote-fileio.c (remote_fileio_request): Update.
	* exceptions.c (catch_exceptions): Use gdb::function_view.
	(catch_exceptions_with_msg, catch_errors): Likewise.
	* exceptions.h (catch_errors, catch_exceptions_with_msg)
	(catch_errors): Update.
	(catch_exceptions_ftype): Remove args.
	(catch_exception_ftype): Remove.
20 files changed