From: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
To: Simon Marchi <simon.marchi@polymtl.ca>,
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 12:53:49 +0000 [thread overview]
Message-ID: <184d13c11de79dbd54fcf598497e3b071811997b.camel@de.ibm.com> (raw)
In-Reply-To: <85a25f1b-d6b8-4ae4-8d41-20d88764f2c0@polymtl.ca>
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.
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 ...
Bye,
Ulrich
next prev parent reply other threads:[~2026-09-23 12:54 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 [this message]
2026-09-23 13:40 ` Simon Marchi
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=184d13c11de79dbd54fcf598497e3b071811997b.camel@de.ibm.com \
--to=ulrich.weigand@de.ibm.com \
--cc=Aditya.Kamath1@ibm.com \
--cc=akamath996@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=sangamesh.swamy@in.ibm.com \
--cc=simon.marchi@polymtl.ca \
--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