From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 101829 invoked by alias); 28 Nov 2018 12:19:24 -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 101719 invoked by uid 89); 28 Nov 2018 12:19:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Nov 2018 12:19:22 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CDE633001BE4; Wed, 28 Nov 2018 12:19:20 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id E4F407A5D5; Wed, 28 Nov 2018 12:19:19 +0000 (UTC) Subject: Re: [PATCH v3 2/3] Add an optional "alias" attribute to syscall entries. To: John Baldwin , Eli Zaretskii References: <20181109200432.84491-1-jhb@FreeBSD.org> <20181109200432.84491-3-jhb@FreeBSD.org> <83efbuattx.fsf@gnu.org> <650590ef-3036-57a8-6cd5-abaa5654add3@FreeBSD.org> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <34fcc769-4533-31bf-d258-36c6110037e0@redhat.com> Date: Wed, 28 Nov 2018 12:19:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <650590ef-3036-57a8-6cd5-abaa5654add3@FreeBSD.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-11/txt/msg00515.txt.bz2 On 11/27/2018 09:53 PM, John Baldwin wrote: > +On some operating systems, a system call name may map to more than one > +system call number. For example, the FreeBSD kernel allocates new > +system call numbers when changing the ABI of an existing system call. > +The kernel also includes a compatibility system call using the old ABI > +and number. FreeBSD's system call XML file includes aliases for > +compatibility system calls that are used to catch all versions of a > +system call. For example, FreeBSD 12 introduced a new variant of the > +@code{kevent} system call. Both system calls are caught when catching > +the @code{kevent} system call: > + > +@smallexample > +(@value{GDBP}) catch syscall kevent > +Catchpoint 1 (syscalls 'freebsd11_kevent' [363] 'kevent' [560]) > +(@value{GDBP}) > +@end smallexample > + I'd suggest replacing "FreeBSD's system call XML file includes" with something else that isn't so implementor-speak. Users needn't be aware of the XML file. Maybe something along the lines of "GDB is aware of aliases for compatibility system calls that are used to catch ..." Or maybe remove the sentence altogether. Maybe simplify it a bit further, as users don't really need to be told that that's what FreeBSD does for all new syscalls, just that some syscalls are like that. I think. Thus, something like this is enough, IMHO: On some operating systems, a system call name may map to more than one system call number. For example, FreeBSD 12 introduced a new variant of the @code{kevent} system call, and included a compatibility system call using the old ABI and number. As convenience, both system calls are caught when catching the @code{kevent} system call by name: @smallexample (@value{GDBP}) catch syscall kevent Catchpoint 1 (syscalls 'freebsd11_kevent' [363] 'kevent' [560]) (@value{GDBP}) @end smallexample Thanks, Pedro Alves