From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qHQtM9QpeWKWRAUAWB0awg (envelope-from ) for ; Mon, 09 May 2022 10:48:52 -0400 Received: by simark.ca (Postfix, from userid 112) id CE8EF1E21F; Mon, 9 May 2022 10:48:52 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=EzULUCFF; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_DYNAMIC, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 62FC11E00D for ; Mon, 9 May 2022 10:48:52 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 138AE394FC0C for ; Mon, 9 May 2022 14:48:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 138AE394FC0C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1652107732; bh=jZPKJZ+PVBjZQzahMiAus6QNuG2KeqgfzpH6kqOTMC4=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=EzULUCFFpHRRyBEFiFrx17RBt4O6TsTq3W5ZzU30hlt6OsgF3NdLSO0ip7ZiJrz6A 1g+b7fZxF0zPIrpLWY3pHB5hMT1Gb+plfFaYa696Ays4OqdHgA6p9OPvlqxtNL7hcU qgsIuyAq5tZzcpVHGTGHDYoRsUDO12tCS9yvP0iw= Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id D6D383949084 for ; Mon, 9 May 2022 14:41:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D6D383949084 Received: from [172.16.0.95] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 5D7951E00D; Mon, 9 May 2022 10:41:04 -0400 (EDT) Message-ID: <129577b3-8c3a-a0c3-e4e3-046873f048bb@simark.ca> Date: Mon, 9 May 2022 10:41:03 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH][gdb] Add gdb/syscalls/Makefile Content-Language: tl To: Tom de Vries , gdb-patches@sourceware.org References: <20220503145732.GA26729@delia.home> <6420bb1d-2660-ff8d-c1bd-b0392cb65295@simark.ca> <7f7ae721-fd30-ee17-1f9e-df5211474194@suse.de> In-Reply-To: <7f7ae721-fd30-ee17-1f9e-df5211474194@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Cc: Sergio Durigan Junior Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2022-05-09 06:26, Tom de Vries via Gdb-patches wrote: > [ Re: [PATCH][gdb/tdep] Support catch syscall pipe2 for i386 ] > > On 5/5/22 15:20, Simon Marchi wrote: >>> [gdb/tdep] Support catch syscall pipe2 for i386 >>> >>> With test-case gdb.base/catch-syscall.exp and target board unix/-m32, we run >>> into: >>> ... >>> (gdb) catch syscall pipe2^M >>> Unknown syscall name 'pipe2'.^M >>> (gdb) FAIL: gdb.base/catch-syscall.exp: determine pipe syscall: catch syscall pipe2 >>> ... >>> >>> Fix this by: >>> - adding a pipe2 entry in gdb/syscalls/i386-linux.xml.in, and >>> - regenerating gdb/syscalls/i386-linux.xml using >>>    "xsltproc --output i386-linux.xml apply-defaults.xsl i386-linux.xml.in". >>      >> The patch LGTM, assuming this is the right number for pipe2 :). >> > > Thanks for the review, committed. > > And, I'd say, yes, the correct number: > ... > $ grep pipe2 ./arch/x86/entry/syscalls/syscall_32.tbl > 331     i386    pipe2                   sys_pipe2 > ... > >> I suppose we are missing more syscalls than that, given that new >> syscalls are added regularly, e.g. rseq: >> >>    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d7822b1e24f2 >> >> As long as rseq is not listed in this file, it means a user wouldn't be >> able to use "catch syscall rseq", I suppose?  We would need a procedure >> to add new syscalls periodically. >> >> Could we add a simple Makefile (as a separate patch) that contains these >> xslt commands?  I think you searched a little bit how those files were >> originally generated, so it would be nice to save the trouble in the >> future. > > Good idea, how about this? > > Thanks, > - Tom LGTM. I would probably use a hand-written list of files in the Makefile rather than the "shell ls", but it the end it doesn't matter much. Simon