diff options
author | Pedro Alves <palves@redhat.com> | 2017-12-06 17:45:09 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2017-12-06 17:49:37 -0500 |
commit | 649a140ccf129ff79ea55ac0cc23ebddec0f02ef (patch) | |
tree | 83e0dbe669695dd27fd9b8a4e7abe698dd3f287c /gdb/target-delegates.c | |
parent | 9a93831ccc0ba3ba447552069f230e6d93dcbf3f (diff) | |
download | gdb-649a140ccf129ff79ea55ac0cc23ebddec0f02ef.zip gdb-649a140ccf129ff79ea55ac0cc23ebddec0f02ef.tar.gz gdb-649a140ccf129ff79ea55ac0cc23ebddec0f02ef.tar.bz2 |
target_set_syscall_catchpoint, use gdb::array_view and bool
I noticed that we're passing down a data/size pair to
target_ops::to_set_syscall_catchpoint. This commit makes use of
gdb::array_view instead. While at it, use bool where appropriate as
well.
gdb/ChangeLog:
* break-catch-syscall.c (insert_catch_syscall)
(remove_catch_syscall): Adjust to pass reference to
inf_data->syscalls_counts directly via gdb::array_view.
* fbsd-nat.c (fbsd_set_syscall_catchpoint): Adjust to use bool
and gdb::array_view.
* linux-nat.c (linux_child_set_syscall_catchpoint): Likewise.
* remote.c (remote_set_syscall_catchpoint): Likewise.
* target-debug.h (target_debug_print_bool): New.
(define target_debug_print_gdb_array_view_const_int): New.
* target-delegates.c: Regenerate.
* target.h (target_ops) <to_set_syscall_catchpoint>: Use
gdb::array_view and bool.
(target_set_syscall_catchpoint): Likewise.
Diffstat (limited to 'gdb/target-delegates.c')
-rw-r--r-- | gdb/target-delegates.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/gdb/target-delegates.c b/gdb/target-delegates.c index 9691074..aaf11d8 100644 --- a/gdb/target-delegates.c +++ b/gdb/target-delegates.c @@ -1286,36 +1286,34 @@ debug_follow_exec (struct target_ops *self, struct inferior *arg1, char *arg2) } static int -delegate_set_syscall_catchpoint (struct target_ops *self, int arg1, int arg2, int arg3, int arg4, int *arg5) +delegate_set_syscall_catchpoint (struct target_ops *self, int arg1, bool arg2, int arg3, gdb::array_view<const int> arg4) { self = self->beneath; - return self->to_set_syscall_catchpoint (self, arg1, arg2, arg3, arg4, arg5); + return self->to_set_syscall_catchpoint (self, arg1, arg2, arg3, arg4); } static int -tdefault_set_syscall_catchpoint (struct target_ops *self, int arg1, int arg2, int arg3, int arg4, int *arg5) +tdefault_set_syscall_catchpoint (struct target_ops *self, int arg1, bool arg2, int arg3, gdb::array_view<const int> arg4) { return 1; } static int -debug_set_syscall_catchpoint (struct target_ops *self, int arg1, int arg2, int arg3, int arg4, int *arg5) +debug_set_syscall_catchpoint (struct target_ops *self, int arg1, bool arg2, int arg3, gdb::array_view<const int> arg4) { int result; fprintf_unfiltered (gdb_stdlog, "-> %s->to_set_syscall_catchpoint (...)\n", debug_target.to_shortname); - result = debug_target.to_set_syscall_catchpoint (&debug_target, arg1, arg2, arg3, arg4, arg5); + result = debug_target.to_set_syscall_catchpoint (&debug_target, arg1, arg2, arg3, arg4); fprintf_unfiltered (gdb_stdlog, "<- %s->to_set_syscall_catchpoint (", debug_target.to_shortname); target_debug_print_struct_target_ops_p (&debug_target); fputs_unfiltered (", ", gdb_stdlog); target_debug_print_int (arg1); fputs_unfiltered (", ", gdb_stdlog); - target_debug_print_int (arg2); + target_debug_print_bool (arg2); fputs_unfiltered (", ", gdb_stdlog); target_debug_print_int (arg3); fputs_unfiltered (", ", gdb_stdlog); - target_debug_print_int (arg4); - fputs_unfiltered (", ", gdb_stdlog); - target_debug_print_int_p (arg5); + target_debug_print_gdb_array_view_const_int (arg4); fputs_unfiltered (") = ", gdb_stdlog); target_debug_print_int (result); fputs_unfiltered ("\n", gdb_stdlog); |