summaryrefslogtreecommitdiff
path: root/gdb/break-catch-syscall.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-12-06 17:45:09 -0500
committerSimon Marchi <simon.marchi@ericsson.com>2017-12-06 17:49:37 -0500
commit649a140ccf129ff79ea55ac0cc23ebddec0f02ef (patch)
tree83e0dbe669695dd27fd9b8a4e7abe698dd3f287c /gdb/break-catch-syscall.c
parent9a93831ccc0ba3ba447552069f230e6d93dcbf3f (diff)
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/break-catch-syscall.c')
-rw-r--r--gdb/break-catch-syscall.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/break-catch-syscall.c b/gdb/break-catch-syscall.c
index dd7b37997b..57044c1bad 100644
--- a/gdb/break-catch-syscall.c
+++ b/gdb/break-catch-syscall.c
@@ -113,8 +113,7 @@ insert_catch_syscall (struct bp_location *bl)
return target_set_syscall_catchpoint (ptid_get_pid (inferior_ptid),
inf_data->total_syscalls_count != 0,
inf_data->any_syscall_count,
- inf_data->syscalls_counts.size (),
- inf_data->syscalls_counts.data ());
+ inf_data->syscalls_counts);
}
/* Implement the "remove" breakpoint_ops method for syscall
@@ -145,8 +144,7 @@ remove_catch_syscall (struct bp_location *bl, enum remove_bp_reason reason)
return target_set_syscall_catchpoint (ptid_get_pid (inferior_ptid),
inf_data->total_syscalls_count != 0,
inf_data->any_syscall_count,
- inf_data->syscalls_counts.size (),
- inf_data->syscalls_counts.data ());
+ inf_data->syscalls_counts);
}
/* Implement the "breakpoint_hit" breakpoint_ops method for syscall