diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2021-11-22 11:27:31 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2021-11-22 13:57:54 -0500 |
commit | c272a98cbf596ddf1a70a41801c6e86d9564d152 (patch) | |
tree | 366b8b105f8450dd1894aebbbae82b8e1946d249 /gdb/break-catch-syscall.c | |
parent | 06de25b7af21eb1173d7b86c5c0f37aae5ec2674 (diff) | |
download | binutils-c272a98cbf596ddf1a70a41801c6e86d9564d152.zip binutils-c272a98cbf596ddf1a70a41801c6e86d9564d152.tar.gz binutils-c272a98cbf596ddf1a70a41801c6e86d9564d152.tar.bz2 |
gdb: pass more const target_waitstatus by reference
While working on target_waitstatus changes, I noticed a few places where
const target_waitstatus objects could be passed by reference instead of
by pointers. And in some cases, places where a target_waitstatus could
be passed as const, but was not. Convert them as much as possible.
Change-Id: Ied552d464be5d5b87489913b95f9720a5ad50c5a
Diffstat (limited to 'gdb/break-catch-syscall.c')
-rw-r--r-- | gdb/break-catch-syscall.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/break-catch-syscall.c b/gdb/break-catch-syscall.c index cb2d776..0212373 100644 --- a/gdb/break-catch-syscall.c +++ b/gdb/break-catch-syscall.c @@ -143,7 +143,7 @@ remove_catch_syscall (struct bp_location *bl, enum remove_bp_reason reason) static int breakpoint_hit_catch_syscall (const struct bp_location *bl, const address_space *aspace, CORE_ADDR bp_addr, - const struct target_waitstatus *ws) + const target_waitstatus &ws) { /* We must check if we are catching specific syscalls in this breakpoint. If we are, then we must guarantee that the called @@ -152,11 +152,11 @@ breakpoint_hit_catch_syscall (const struct bp_location *bl, const struct syscall_catchpoint *c = (const struct syscall_catchpoint *) bl->owner; - if (ws->kind () != TARGET_WAITKIND_SYSCALL_ENTRY - && ws->kind () != TARGET_WAITKIND_SYSCALL_RETURN) + if (ws.kind () != TARGET_WAITKIND_SYSCALL_ENTRY + && ws.kind () != TARGET_WAITKIND_SYSCALL_RETURN) return 0; - syscall_number = ws->syscall_number (); + syscall_number = ws.syscall_number (); /* Now, checking if the syscall is the same. */ if (!c->syscalls_to_be_caught.empty ()) |