From: Simon Marchi <simon.marchi@polymtl.ca>
To: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
Aditya Vidyadhar Kamath <akamath996@gmail.com>,
"tom@tromey.com" <tom@tromey.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
Aditya Kamath <Aditya.Kamath1@ibm.com>,
SANGAMESH MALLAYYA <sangamesh.swamy@in.ibm.com>
Subject: Re: [PATCH v3] Remove stale pre-AIX-7.2 compatibility guards
Date: Wed, 23 Sep 2026 09:40:47 -0400 [thread overview]
Message-ID: <14ef0431-f930-4b03-a186-87b866c0fa06@polymtl.ca> (raw)
In-Reply-To: <184d13c11de79dbd54fcf598497e3b071811997b.camel@de.ibm.com>
On 9/23/26 8:53 AM, Ulrich Weigand wrote:
> Simon Marchi <simon.marchi@polymtl.ca> wrote:
>> On 9/22/26 12:52 AM, Aditya Vidyadhar Kamath wrote:
>>> From: Aditya Kamath <Aditya.Kamath1@ibm.com>
>>>
>>> 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
next prev parent reply other threads:[~2026-09-23 13:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 4:52 Aditya Vidyadhar Kamath
2026-09-22 19:58 ` Simon Marchi
2026-09-23 12:53 ` Ulrich Weigand
2026-09-23 13:40 ` Simon Marchi [this message]
2026-09-22 20:35 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=14ef0431-f930-4b03-a186-87b866c0fa06@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=Aditya.Kamath1@ibm.com \
--cc=Ulrich.Weigand@de.ibm.com \
--cc=akamath996@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=sangamesh.swamy@in.ibm.com \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox