From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110700 invoked by alias); 16 Nov 2018 17:44:03 -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 110678 invoked by uid 89); 16 Nov 2018 17:44:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.1 required=5.0 tests=AWL,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=imo, IMO, FreeBSD, freebsd 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; Fri, 16 Nov 2018 17:43:59 +0000 Received: from John-Baldwins-MacBook-Pro-2.local (ralph.baldwin.cx [66.234.199.215]) by mail.baldwin.cx (Postfix) with ESMTPSA id 973D410A87D; Fri, 16 Nov 2018 12:43:57 -0500 (EST) Subject: Re: [PATCH v3 2/3] Add an optional "alias" attribute to syscall entries. To: Eli Zaretskii References: <20181109200432.84491-1-jhb@FreeBSD.org> <20181109200432.84491-3-jhb@FreeBSD.org> <83efbuattx.fsf@gnu.org> Cc: gdb-patches@sourceware.org From: John Baldwin Openpgp: preference=signencrypt Message-ID: <36bd0ca7-ffb9-3cbe-584f-d1e1e54b6034@FreeBSD.org> Date: Fri, 16 Nov 2018 17:44: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: <83efbuattx.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-11/txt/msg00255.txt.bz2 On 11/9/18 12:18 PM, Eli Zaretskii wrote: >> From: John Baldwin >> Date: Fri, 9 Nov 2018 12:04:31 -0800 >> >> diff --git a/gdb/NEWS b/gdb/NEWS >> index ff9b192a38..ff225f361e 100644 >> --- a/gdb/NEWS >> +++ b/gdb/NEWS >> @@ -38,6 +38,11 @@ >> requires the use of a keyword. Selecting a frame by level is >> unchanged. The MI comment "-stack-select-frame" is unchanged. >> >> +* System call catchpoints now support system call aliases. This is >> + used with the FreeBSD system call list so that system call >> + catchpoints will also trigger for legacy system call numbers used by >> + older FreeBSD binaries. > > IMO, this is very abstract and too vague to be useful. Since we won't > have anything more detailed in the manual, would it be possible to > make this description more concrete? E.g., how about using some of > the text and examples you used in your description of the issue: Ok. I wasn't too happy with my first attempt either. I've tried to give some more detail while not making it too long. Let me know what you think: * System call catchpoints now support system call aliases on FreeBSD. When the ABI of a system call changes in FreeBSD, this is implemented by leaving a compatibility system call using the old ABI at the existing number and allocating a new system call number for the new ABI. For example, FreeBSD 12 altered the layout of 'struct kevent' used by the 'kevent' system call. As a result, FreeBSD 12 kernels ship with both 'kevent' and 'freebsd11_kevent' system calls. The 'freebsd11_kevent' system call is assigned an alias of 'kevent' so that a system call catchpoint for the 'kevent' system call will catch invocations of both the 'kevent' and 'freebsd11_kevent' binaries. This ensures that 'kevent' system calls are caught for binaries using either the old or new ABIs. -- John Baldwin                                                                            Â