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/linux-nat.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/linux-nat.c')
-rw-r--r-- | gdb/linux-nat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 96cb21a..b8f3108 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -676,8 +676,8 @@ linux_child_remove_exec_catchpoint (struct target_ops *self, int pid) static int linux_child_set_syscall_catchpoint (struct target_ops *self, - int pid, int needed, int any_count, - int table_size, int *table) + int pid, bool needed, int any_count, + gdb::array_view<const int> syscall_counts) { if (!linux_supports_tracesysgood ()) return 1; @@ -685,7 +685,7 @@ linux_child_set_syscall_catchpoint (struct target_ops *self, /* On GNU/Linux, we ignore the arguments. It means that we only enable the syscall catchpoints, but do not disable them. - Also, we do not use the `table' information because we do not + Also, we do not use the `syscall_counts' information because we do not filter system calls here. We let GDB do the logic for us. */ return 0; } |