From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id WFCJLR7Xs2q1oDcAWB0awg (envelope-from ) for ; Wed, 23 Sep 2026 09:41:50 -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=EKxZfcKJ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id A17271E01F; Wed, 23 Sep 2026 09:41:50 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.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,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 ECEB91E01F for ; Wed, 23 Sep 2026 09:41:48 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 668374BB3BB7 for ; Wed, 23 Sep 2026 13:41:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 668374BB3BB7 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=EKxZfcKJ Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 312EF4BB3BA3 for ; Wed, 23 Sep 2026 13:40:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 312EF4BB3BA3 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 312EF4BB3BA3 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=1790170859; cv=none; b=Yv/uwW9xYHe/y/dy3AvKzB8jHx7FP8lciB5DgRglI7zZ0ChNnlAvYl6FwOA0aOr+V3Yr7RATDgBjOMd3A7M0/M21ppQT+v6t7X1C+m/r5renajgljeadouuoOfOeHNuctHRg1SFz4IGYmfFfEUF83KmcXj6hVNKitsoguapJfQ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790170859; c=relaxed/simple; bh=d0qx3v8upSIg6xMEZUQKmxEHII9mtlqOf9ysCsd5iWA=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=bUD1kZfpcJjTRyqlr50T6mjHP4qh2FFfHEud01+UbE6sU4efa7mhk2cJiJ0SPVt8aC/o3+c24rdDdTY0HNvEDjeAVGdsfnjLA6tyret1YClDhgoYMQE/xwWqCUcUq+5KbRGSI5UOzTpPtDPnJjYXfd0D2TGD7Qrbauqsqj31z1U= 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=EKxZfcKJ DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 312EF4BB3BA3 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 68NDem8t088639 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 23 Sep 2026 09:40:53 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 68NDem8t088639 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=oct2025; t=1790170854; bh=xLmIbUG4UmytjpO9Zm7uxI276AQWSVIOzWh0+n7TC+U=; h=Date:Subject:To:Cc:From:In-Reply-To:From; b=EKxZfcKJrK9aKjjlmjwOU0asdhMRNVTP78hjCf9LIovGHaPVq2Cvs2mD9KtoYTyNl TXX1OC/IKiEeYsEH+0/JxelTzkXJYdzi/hLaG11iIuMX4YiHP4wz4t5Grm0sAUVuSl 3LdnLrIXJr+nllV74Bv4UZq0g8CQiERwwW1EfPLziSMuADYv7gV+qwStpryZBitL+O 9ep4kdQlGWbRX6jlfeSTHm/jN+4XV/gMYKsJkwF1l8n1N3tqow0gXiJXoUr1hdJPj3 8oWxF5oajBYbovRfnFKkmw5LChlk2sbnugkCnCwcBDQy+Izrn5nxoMpeWGQzhXNvGg loCYSzTtqnoQA== Received: by simark.ca (Postfix) id B12B61E01F; Wed, 23 Sep 2026 09:40:47 -0400 (EDT) Message-ID: <14ef0431-f930-4b03-a186-87b866c0fa06@polymtl.ca> Date: Wed, 23 Sep 2026 09:40:47 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] Remove stale pre-AIX-7.2 compatibility guards To: Ulrich Weigand , Aditya Vidyadhar Kamath , "tom@tromey.com" Cc: "gdb-patches@sourceware.org" , Aditya Kamath , SANGAMESH MALLAYYA References: <20260922045230.58748-2-akamath996@gmail.com> <85a25f1b-d6b8-4ae4-8d41-20d88764f2c0@polymtl.ca> <184d13c11de79dbd54fcf598497e3b071811997b.camel@de.ibm.com> Content-Language: fr From: Simon Marchi In-Reply-To: <184d13c11de79dbd54fcf598497e3b071811997b.camel@de.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 23 Sep 2026 13:40:48 +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/23/26 8:53 AM, Ulrich Weigand wrote: > Simon Marchi wrote: >> 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-ptrace6>4-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? > > I think Simon is correct here. For GPRS access, I understand only > the following options are supported: > > ptrace: 32- or 64-bit GDB, 32-bit inferior > ptracex: 32-bit GDB, 64-bit inferior > ptrace64: 64-bit GDB, 64-bit inferior > > As I understand, the current set of indirections is intended to > cover that space - for a 32-bit inferior, you call ptrace, and > for a 64-bit inferior you call either ptracex or ptrace64, > depending on whether GDB is built as 64-bit. Ideally, we wouldn't just guess. Do you run the testsuite on AIX? If so, you should be able to run it in a mode that builds the test programs as 32-bit programs. For example: $ make check RUNTESTFLAGS='--target_board "unix/-m32" Taken from: https://sourceware.org/gdb/wiki/TestingGDB#Changing_the_compiler_used_to_build_the_testcases > Why do you think we can simplify this? I guess we could make > possibly make the assumption that GDB itself is always built > as 64-bit these days, but then we still have to select between > ptrace and ptrace64 at the least ... I think that requiring GDB to be built as 64-bit program would be reasonable (if so you should add a static check in the source for that). Simon