From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id a8FOC+ZNX2HndQAAWB0awg (envelope-from ) for ; Thu, 07 Oct 2021 15:43:34 -0400 Received: by simark.ca (Postfix, from userid 112) id 1C9341EE20; Thu, 7 Oct 2021 15:43:34 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.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 6F0B31EDDB for ; Thu, 7 Oct 2021 15:43:33 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CB946385840C for ; Thu, 7 Oct 2021 19:43:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB946385840C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1633635812; bh=tbQ3Fg/xaghRN2eBZgH/OR1Wm/9zu0GvNQasOcP7jBE=; h=To:Subject:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=EIWHZZDUNXot/laeTSUXKxp1CUBq5Ciy6AAXlfgfQA1BXpRVZPsXjzVouTKdTq3dz Xd1eGIbTxwNbUqjJCP21G3hBItuQuR9hV7Hd90Gb+XiK+QWKOBFNH43EHPgcJ+3CkA TM8NOJILzraUCh/Pz1ND3NTibNakbQlgYd4TymOU= Received: from mail.sergiodj.net (mail.sergiodj.net [167.114.15.217]) by sourceware.org (Postfix) with ESMTPS id 41DBB385840C for ; Thu, 7 Oct 2021 19:43:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 41DBB385840C Received: from localhost (bras-base-toroon1016w-grc-45-76-65-26-78.dsl.bell.ca [76.65.26.78]) by mail.sergiodj.net (Postfix) with ESMTPSA id 8CF44A01D1; Thu, 7 Oct 2021 15:43:11 -0400 (EDT) To: Ulrich Weigand via Gdb-patches Subject: Re: [PATCH] Powerpc: Add support for openat and fstatat syscalls References: <22a9ea816266f1b9e6948a396a1dc45cb5f8f153.camel@us.ibm.com> X-URL: http://blog.sergiodj.net Date: Thu, 07 Oct 2021 15:43:11 -0400 In-Reply-To: (Ulrich Weigand via Gdb-patches's message of "Thu, 7 Oct 2021 19:52:11 +0200") Message-ID: <87k0ioaaeo.fsf@paluero> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: Sergio Durigan Junior via Gdb-patches Reply-To: Sergio Durigan Junior Cc: Ulrich Weigand , Rogerio Alves Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On Thursday, October 07 2021, Ulrich Weigand via Gdb-patches wrote: > "Carl Love" wrote on 05.10.2021 22:59:06: > >> + else if (syscall == 286) >> + result = gdb_sys_openat; > > This looks OK, but ... > >> + else if (syscall == 291) >> + result = gdb_sys_fstatat64; > > syscall 291 is actually different between 32-bit > and 64-bit: on 32-bit it is fstatat64, but on > 64-bit it is newfstatat. > > Given that this routine seems to be used for > both flavors, it should be correct for both. > > (Also, there seem to be many more syscalls that > are not handled even though they could be. But > that can be left for another time I guess ...) As a side note, and something that has bothered me for many years now: this entire file relies on hardcoded syscall values, while GDB maintains XML files for syscalls in several different architectures due to the "catch syscall" command. Ideally the reverse/record feature should be rewritten to use those XML files instead. Ref.: https://sourceware.org/bugzilla/show_bug.cgi?id=17402 Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible https://sergiodj.net/