]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Change exceptions.h functions to use gdb::function_view
authorTom Tromey <tom@tromey.com>
Wed, 27 Sep 2017 16:53:02 +0000 (10:53 -0600)
committerPedro Alves <palves@redhat.com>
Wed, 27 Sep 2017 21:43:09 +0000 (22:43 +0100)
commit021f945efb3ef8b1880aa510507cbe6355652516
treefc50d43c62ce593de7fca96626c7314833d6344e
parent96a5a1d3780a46b578842d9aeea3e98211dc20ec
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:
gdb/breakpoint.c
gdb/exceptions.c
gdb/exceptions.h
gdb/infrun.c
gdb/main.c
gdb/objc-lang.c
gdb/record-full.c
gdb/remote-fileio.c
gdb/solib-aix.c
gdb/solib-darwin.c
gdb/solib-dsbt.c
gdb/solib-frv.c
gdb/solib-svr4.c
gdb/solib-target.c
gdb/solib.c
gdb/solist.h
gdb/symfile-mem.c
gdb/symmisc.c
gdb/thread.c
gdb/windows-nat.c