From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29749 invoked by alias); 6 Dec 2017 22:38:10 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 29738 invoked by uid 89); 6 Dec 2017 22:38:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.2 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy= X-HELO: mail.baldwin.cx Received: from bigwig.baldwin.cx (HELO mail.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 06 Dec 2017 22:38:07 +0000 Received: from John-Baldwins-MacBook-Pro-3.local (unknown [IPv6:2601:648:8500:5fb:e11d:d625:1f5c:9210]) by mail.baldwin.cx (Postfix) with ESMTPSA id D64BA10AB01; Wed, 6 Dec 2017 17:38:04 -0500 (EST) Subject: Re: [PATCH 2/2] target_set_syscall_catchpoint, use gdb::array_view and bool To: Simon Marchi , Pedro Alves , gdb-patches@sourceware.org References: <1509377531-21044-1-git-send-email-palves@redhat.com> <1509377531-21044-3-git-send-email-palves@redhat.com> <19e8ceb2-8c71-9d94-eeff-324200f2582b@simark.ca> From: John Baldwin Message-ID: <4f91f6f2-9b0f-d750-5d03-30fc23c0613d@FreeBSD.org> Date: Wed, 06 Dec 2017 22:38:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <19e8ceb2-8c71-9d94-eeff-324200f2582b@simark.ca> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg00127.txt.bz2 On 12/3/17 10:18 AM, Simon Marchi wrote: > On 2017-10-30 11:59 AM, John Baldwin wrote: >> On 10/30/17 3:32 PM, Pedro Alves wrote: >>> 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: >>> yyyy-mm-dd Pedro Alves >>> >>> * break-catch-syscall.c (insert_catch_syscall) >>> (remove_catch_syscall): Adjust to pass reference to >>> inf_data->syscalls_counts directly via gdb::array_view. >>> * linux-nat.c (linux_child_set_syscall_catchpoint): Adjust to use >>> bool and gdb::array_view. >> >> I believe fbsd-nat.c will need a similar fixup? It doesn't use the >> values passed but does implement the target method. > > Hi John, > > Can you check if this updated patch builds properly on FreeBSD? > > Thanks! Just one typo below: > diff --git a/gdb/fbsd-nat.c b/gdb/fbsd-nat.c > index 265175a769..1a36414837 100644 > --- a/gdb/fbsd-nat.c > +++ b/gdb/fbsd-nat.c > @@ -1163,8 +1163,9 @@ fbsd_remove_exec_catchpoint (struct target_ops *self, int pid) > > #ifdef HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE > static int > -fbsd_set_syscall_catchpoint (struct target_ops *self, int pid, int needed, > - int any_count, int table_size, int *table) > +fbsd_set_syscall_catchpoint (struct target_ops *self, int pid, bool needed, > + int any_count, > + gdb::array_view syscall_counts)) Double close paren here should be a single, but builds fine aside from that, thanks! -- John Baldwin