From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19327 invoked by alias); 9 Nov 2018 04:34:55 -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 19313 invoked by uid 89); 9 Nov 2018 04:34:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no 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; Fri, 09 Nov 2018 04:34:53 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 83461300156A; Fri, 9 Nov 2018 04:34:52 +0000 (UTC) Received: from pinnacle.lan (ovpn-116-78.phx2.redhat.com [10.3.116.78]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4F0D25C2E4; Fri, 9 Nov 2018 04:34:52 +0000 (UTC) Date: Fri, 09 Nov 2018 04:34:00 -0000 From: Kevin Buettner To: gdb-patches@sourceware.org Cc: John Baldwin Subject: Re: [PATCH v2 2/3] Add an optional "alias" attribute to syscall entries. Message-ID: <20181108213450.672eafca@pinnacle.lan> In-Reply-To: <20181106175431.59832-3-jhb@FreeBSD.org> References: <20181106175431.59832-1-jhb@FreeBSD.org> <20181106175431.59832-3-jhb@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-11/txt/msg00142.txt.bz2 On Tue, 6 Nov 2018 09:54:30 -0800 John Baldwin wrote: > When setting a syscall catchpoint by name, catch syscalls whose name > or alias matches the requested string. > > When the ABI of a system call is changed in the FreeBSD kernel, this > is implemented by leaving a compatibility system call using the old > ABI at the existing "slot" and allocating a new system call for the > version using the new ABI. For example, new fields were added to the > 'struct kevent' used by the kevent() system call in FreeBSD 12. The > previous kevent() system call in FreeBSD 12 kernels is now called > freebsd11_kevent() and is still used by older binaries compiled > against the older ABI. The freebsd11_kevent() system call can be > tagged with an "alias" attribute of "kevent" permitting 'catch syscall > kevent' to catch both system calls and providing the expected user > behavior for both old and new binaries. It also provides the expected > behavior if GDB is compiled on an older host (such as a FreeBSD 11 > host). > > gdb/ChangeLog: > > * break-catch-syscall.c (catch_syscall_split_args): Update for > get_syscalls_by_name returning a vector. > * gdbarch.sh (UNKNOWN_SYSCALL): Remove. > * gdbarch.h: Regenerate. > * syscalls/gdb-syscalls.dtd (syscall): Add alias attribute. > * xml-syscall.c [!HAVE_LIBEXPAT] (get_syscalls_by_name): Rename > from get_syscall_by_name. Now returns a vector of integers. > [HAVE_LIBEXPAT] (struct syscall_desc): Add alias member. > (syscall_create_syscall_desc): Add alias parameter and pass it to > syscall_desc constructor. > (syscall_start_syscall): Handle alias attribute. > (syscall_attr): Add alias attribute. > (xml_get_syscalls_by_name): Rename from xml_get_syscall_number. > Now returns a vector of integers. Add syscalls whose alias or > name matches the requested name. > (get_syscalls_by_name): Rename from get_syscall_by_name. Now > returns a vector of integers. > * xml-syscall.h (get_syscalls_by_name): Likewise. Okay. Kevin