From: Aditya Kamath <Aditya.Kamath1@ibm.com>
To: Tom Tromey <tom@tromey.com>,
Aditya Vidyadhar Kamath <akamath996@gmail.com>
Cc: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
"simon.marchi@polymtl.ca" <simon.marchi@polymtl.ca>,
"tom@tromey.com" <tom@tromey.com>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
SANGAMESH MALLAYYA <sangamesh.swamy@in.ibm.com>,
PRAJWAL B MEHENDARKAR <PRAJWAL.B.MEHENDARKAR@ibm.com>
Subject: RE: [PATCH v1] Fix wrong build tree in python.exp path on AIX
Date: Mon, 24 Aug 2026 06:48:47 +0000 [thread overview]
Message-ID: <LV8PR15MB6488CDC799A938D496F7B1CAD6A02@LV8PR15MB6488.namprd15.prod.outlook.com> (raw)
In-Reply-To: <874ignscm6.fsf@tromey.com>
[-- Attachment #1: Type: text/plain, Size: 1646 bytes --]
Hi Tom and community members,
>I don't really understand this, but (1) I didn't see any other
>commentary on it and (2) it seems to be AIX-specific.
>So, I think it is ok. I appreciate the comment in there.
>It's fine if you want to apply this to the gdb-18 branch as well.
>Approved-By: Tom Tromey <tom@tromey.com>
Thank you for the approval. I have pushed the same.
https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=7063b767cc9c2774e7ead41144e5613bacad6a0d
So, the problem is LINKFORSHARED in AIX also tries to search for Modules/python.exp file. This file tells the AIX linker all the symbols exported from the libpython3.12.a(libpython3.12.so) shared library for symbols resolution. If we do not use this export file AIX Linker thinks nothing is exported from that library and then symbols are not found and python is not linked when GDB binary uses functions from python library.
In this case we do not have the python.exp file in “Modules” path. We have it in /opt/freeware/lib64/python3.12/config-3.12/
# ls -l /opt/freeware/lib64/python3.12/config-3.12/python.exp
-rw-r--r-- 1 root system 52887 Jun 30 01:43 /opt/freeware/lib64/python3.12/config-3.12/python.exp
bash-5.3# head -7 /opt/freeware/lib64/python3.12/config-3.12/python.exp
#!libpython3.12.a(libpython3.12.so)
PyAIter_Check
PyAST_Check
PyAST_mod2obj
PyAST_obj2mod
PyAnextAwaitable_New
PyArg_Parse
So we need to get GDB to understand where /opt/freeware/lib64/python3.12/config-3.12/python.exp is which is done by LIBPL/python.exp and then GDB in AIX compiles with python.
Hope this helps.
Thanks and regards,
Aditya,
[-- Attachment #2: Type: text/html, Size: 5006 bytes --]
prev parent reply other threads:[~2026-08-24 6:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 5:48 Aditya Vidyadhar Kamath
2026-08-21 15:43 ` Tom Tromey
2026-08-24 6:48 ` Aditya Kamath [this message]
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=LV8PR15MB6488CDC799A938D496F7B1CAD6A02@LV8PR15MB6488.namprd15.prod.outlook.com \
--to=aditya.kamath1@ibm.com \
--cc=PRAJWAL.B.MEHENDARKAR@ibm.com \
--cc=Ulrich.Weigand@de.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