From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id PVTmG/LdsmpQHTQAWB0awg (envelope-from ) for ; Tue, 22 Sep 2026 15:58:42 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=rBZQojrR; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 4B84F1E06B; Tue, 22 Sep 2026 15:58:42 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 484161E01F for ; Tue, 22 Sep 2026 15:58:41 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C13634BAE7E1 for ; Tue, 22 Sep 2026 19:58:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C13634BAE7E1 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=rBZQojrR Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 8627D4BA798D for ; Tue, 22 Sep 2026 19:58:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8627D4BA798D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8627D4BA798D Authentication-Results: sourceware.org; arc=none smtp.remote-ip=132.207.4.11 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790107095; cv=none; b=rbzdwW3c44xRP+C6IKGeEXjX4TADFOUmpT6ueW1eVzbBhVwLU2C+boGkFk8PQ720HclmBJNwYHdnqmXjDvfLvpJoN6oCqxqMvw2mDP71WmuSzsmsNu5gRvpwhFgyT4DPceY/z0Er/zo6ihr9sokSl82U1ubSrAgmQt5kwjyHuak= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790107095; c=relaxed/simple; bh=aJ1n6FFoy1Yv/Qn7eGoajgbtHwQcmIXYtuYlJjRwrvg=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=aEcwEortsdNKB4zWsgtdG3389adCt/W1QOPqX88rE4wrjmxtwjtt+GuQF695dWyUqEZ1utFrdz4pwrSQt4GIk2H7b4zE1a788dstDaH4wZcfv8RH5dKC36LbBr09Bsxv6Gioqnl9rTXC6vZ/Kxh7E2LjmjxuH5o1OUD9RnLskT4= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=polymtl.ca header.i=@polymtl.ca header.a=rsa-sha256 header.s=oct2025 header.b=rBZQojrR DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8627D4BA798D Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 68MJw5ST056231 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Sep 2026 15:58:10 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 68MJw5ST056231 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=oct2025; t=1790107091; bh=7qVKF7XdfZPhrjVeQCikUQm/Ta2PMYWc4Bas/inNwek=; h=Date:Subject:To:Cc:From:In-Reply-To:From; b=rBZQojrRtjCJzwPB3d23sq3Uu9XGr0i30CK3LAkjbvNSdYp2Gw158wDaTuNLab2O3 JhCaHOjZuznyp0QE3MwhT1yXFjxxUt+zYys122cTBjJQAgImW5gXg6+e7DUjkT4pV3 TDEU3S9cUrxVBBRSkWi7D2guqGoDAfoASLXo0U45i0CHqadAy/8jJk3o9PZ0VCOM03 7VSLb3d2874JDeq+rQlp6wq6oLRw4T0L69V+FGGP3pts+1RGUoMsrlsvWVRex+fkA3 HpoWB7Uwoa76vP+FWDdEcLXytS2nWCqE7yeoN+yejiOS8AtWz3IkgcUydPDmysYcqg u/EvtGYQ73IYg== Received: by simark.ca (Postfix) id E9C1A1E01F; Tue, 22 Sep 2026 15:58:03 -0400 (EDT) Message-ID: <85a25f1b-d6b8-4ae4-8d41-20d88764f2c0@polymtl.ca> Date: Tue, 22 Sep 2026 15:58:03 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] Remove stale pre-AIX-7.2 compatibility guards To: Aditya Vidyadhar Kamath , ulrich.weigand@de.ibm.com, tom@tromey.com Cc: gdb-patches@sourceware.org, Aditya.Kamath1@ibm.com, sangamesh.swamy@in.ibm.com References: <20260922045230.58748-2-akamath996@gmail.com> Content-Language: fr From: Simon Marchi In-Reply-To: <20260922045230.58748-2-akamath996@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 22 Sep 2026 19:58:05 +0000 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 9/22/26 12:52 AM, Aditya Vidyadhar Kamath wrote: > From: Aditya Kamath > > GDB now requires AIX 7.2 as the minimum supported version and will > support AIX 7.2 TL5, AIX 7.3 and upcoming AIX releases. Remove > dead compatibility code that existed only for older releases. > > Remove the HAVE_DECL_GETTHRDS configure check since aix-thread.c was the last > user of that macro. Merge ptrace64aix and ptrace32 into a single > ptrace_aix function since they became identical after this > cleanup, and collapse all call sites that branched on arch64 just to > pick between the two. Also clean up rs6000-aix-nat.c by removing the > ARCH3264 and HAVE_PTRACE64 guards along with the ptracex fallback in > rs6000_ptrace32 and rs6000_ptrace64, which are now simple wrappers > around ptrace64. > > Also as per https://www.ibm.com/docs/en/aix/7.2.0?topic=p-ptrace-ptracex-ptrace64-subroutine > ptrace64 will also support 32-bit debugees. On this page I see: For ptracex or ptrace64: If the debuggee is a 32-bit process, the options that refer to GPRs or SPRs fail with errno = EIO And I see that in the patch, you call ptrace64 to read registers (PTT_READ_GPRS) for 32 bit processes. How does that work? > @@ -315,40 +306,13 @@ ptrace_check (int req, int id, int ret) > return 0; /* Not reached. */ > } > > -/* Call ptracex (REQ, ID, ADDR, DATA, BUF) or > - ptrace64 (REQ, ID, ADDR, DATA, BUF) if HAVE_PTRACE64. > - Return success. */ > - > -#ifdef HAVE_PTRACE64 > -# define ptracex(request, pid, addr, data, buf) \ > - ptrace64 (request, pid, addr, data, buf) > -#endif > +/* Call ptrace64 (REQ, ID, ADDR, DATA, BUF). Return success. */ I think that all these "Call ptrace64" comments are not very useful. We can see that by reading the code. Change the comment to explain why this wrapper function needs to exist (if it really does). I think you could simplify this one further by moving the actual ptrace64 call into ptrace_check (so that it does the ptrace call and the check), and get rid of ptraceaix. There is one level of abstraction that is not needed anymore here. If you only rely on ptrace64 now, I'd suggest changing the "id" parameters to "long long", to match the type of ptrace64. Otherwise, that looks fine to me. I'll let Ulrich check the more specific AIX details. Simon