From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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) From: Sergio Durigan Junior To: Ulrich Weigand via Gdb-patches Cc: "Carl Love" , Ulrich Weigand , Rogerio Alves 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-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org 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: , X-List-Received-Date: Thu, 07 Oct 2021 19:43:15 -0000 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/