From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 81396 invoked by alias); 20 Jun 2016 17:10:21 -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 81340 invoked by uid 89); 20 Jun 2016 17:10:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_SOFTFAIL autolearn=no version=3.3.2 spammy= X-HELO: bigwig.baldwin.cx Received: from bigwig.baldwin.cx (HELO bigwig.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Mon, 20 Jun 2016 17:10:10 +0000 Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A2AA0B96E for ; Mon, 20 Jun 2016 13:10:07 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org Subject: Re: [PATCH] Add support for catching system calls to native FreeBSD targets. Date: Mon, 20 Jun 2016 17:10:00 -0000 Message-ID: <3027504.g5mkIDnfYi@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <20160614205751.11566-1-jhb@FreeBSD.org> References: <20160614205751.11566-1-jhb@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00334.txt.bz2 On Tuesday, June 14, 2016 01:57:51 PM John Baldwin wrote: > All platforms on FreeBSD use a shared system call table, so use a > single XML file to describe the system calls available on each FreeBSD > platform. > > xRecent versions of FreeBSD include the identifier of the current > system call when reporting a system call entry or exit event in the > ptrace_lwpinfo structure obtained via PT_LWPINFO in fbsd_wait. As > such, FreeBSD native targets do not use the gdbarch method to fetch > the system call code. In addition, FreeBSD register sets fetched via > ptrace do not include an equivalent of 'orig_rax' (on amd64 for > example), so the system call code cannot be extracted from the > available registers during a system call exit. However, GDB assumes > that system call catch points are not supported if the gdbarch method > is not present. As a workaround, FreeBSD ABIs install a dummy gdbarch > method that throws an internal_error if it is ever invoked. Ping? I don't think this conflicts with the pending patches to add system call groups. (Presumbly I would just need a followup change to annotate the groups in freebsd.xml.) -- John Baldwin