From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118220 invoked by alias); 27 Nov 2018 20:00:58 -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 112463 invoked by uid 89); 27 Nov 2018 20:00:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.2 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy=H*M:684a 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; Tue, 27 Nov 2018 20:00:38 +0000 Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 907AA10B670; Tue, 27 Nov 2018 15:00:20 -0500 (EST) Subject: Re: [PATCH v3 0/3] Update FreeBSD's syscall table To: Pedro Alves , gdb-patches@sourceware.org References: <20181109200432.84491-1-jhb@FreeBSD.org> <7ffda341-7706-d541-939e-f45a7a3f9bd7@FreeBSD.org> From: John Baldwin Openpgp: preference=signencrypt Message-ID: <3ef4beb3-684a-31d0-bae5-07839ed93bde@FreeBSD.org> Date: Tue, 27 Nov 2018 20:00:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-11/txt/msg00478.txt.bz2 On 11/27/18 9:19 AM, Pedro Alves wrote: > On 11/26/2018 08:31 PM, John Baldwin wrote: >> On 11/9/18 12:04 PM, John Baldwin wrote: >>> Relative to V2, this changes the "get syscalls" functions to pass in >>> an integer vector by reference to append syscall numbers to. It also >>> adds a NEWS entry and fixes some other nits noted by reviewers on the >>> V2 series. >>> >>> John Baldwin (3): >>> Change get_syscalls_by_group to append to an existing vector of >>> integers. >>> Add an optional "alias" attribute to syscall entries. >>> Update the FreeBSD system call table to match FreeBSD 12.0. >>> >>> gdb/ChangeLog | 41 ++++++++++++ >>> gdb/NEWS | 5 ++ >>> gdb/break-catch-syscall.c | 25 ++------ >>> gdb/gdbarch.h | 3 - >>> gdb/gdbarch.sh | 3 - >>> gdb/syscalls/freebsd.xml | 110 ++++++++++++++++++++++++++------- >>> gdb/syscalls/gdb-syscalls.dtd | 1 + >>> gdb/syscalls/update-freebsd.sh | 78 +++++++++++++++++++++++ >>> gdb/xml-syscall.c | 108 ++++++++++++++++---------------- >>> gdb/xml-syscall.h | 20 +++--- >>> 10 files changed, 279 insertions(+), 115 deletions(-) >>> create mode 100755 gdb/syscalls/update-freebsd.sh >> >> Ping? Eli signed off on an updated NEWS entry earlier in the thread. Any >> further comments on the code changes? > This looks good to me, though there's the issue with the non-const > references discussed here: > > https://sourceware.org/ml/gdb-patches/2018-11/msg00351.html > https://sourceware.org/ml/gdb-patches/2018-11/msg00441.html > https://sourceware.org/ml/gdb-patches/2018-11/msg00443.html > https://sourceware.org/ml/gdb-patches/2018-11/msg00444.html Oh, whoops, I skimmed that thread I'm afraid. :( I used a reference here due to the reasons you mentioned in your first message, primarily not having to deal with it being NULL. I'm fine with updating that to a pointer if that is the preferred route though. > BTW: > >> - >> + >> ... >> + > > Does "catch syscall 498" catch only freebsd11_mknodat calls, or do > we for some reason end up catching calls to 559 as well? > I'd expect only 498. What about "catch syscall 559"? They work as you would expect: (gdb) catch syscall 498 Catchpoint 1 (syscall 'freebsd11_mknodat' [498]) (gdb) catch syscall 559 Catchpoint 2 (syscall 'mknodat' [559]) (gdb) info breakpoints Num Type Disp Enb Address What 1 catchpoint keep y syscall "freebsd11_mknodat" 2 catchpoint keep y syscall "mknodat" The aliases are only used when a syscall name is given rather than a number. -- John Baldwin                                                                            Â