Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Aditya Kamath <Aditya.Kamath1@ibm.com>
To: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
	"akamath996@gmail.com" <akamath996@gmail.com>,
	"tom@tromey.com" <tom@tromey.com>,
	"simon.marchi@polymtl.ca" <simon.marchi@polymtl.ca>
Cc: "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] Add TLS variable debug support for AIX [ 64-bit XCOFF files only]
Date: Mon, 3 Aug 2026 11:04:20 +0000	[thread overview]
Message-ID: <LV8PR15MB6488EA9A6761B30855C2E391D6D52@LV8PR15MB6488.namprd15.prod.outlook.com> (raw)
In-Reply-To: <bd16314c7b6fe5f7ec87f5f4afa7892d595749fa.camel@de.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1487 bytes --]

Hi Ulrich and community members,

Thank you for your feedback.

>This doesn't look right to me.  The issue is not so much the
>"TLS model", which is mostly a matter of optimization.  The
>issue is more fundamental: thread-local variables defined in
>libraries loaded with dlopen *cannot* be accessed directly
>relative to the thread pointer, because the storage for
>those is only allocated at dlopen time and not statically
>known at compile or link time.


>Ideally, you should be able to implement full support (by
>accessing the AIX libc equivalent of the DTV).  If that is
>not possible for some reason, then you should at least
>restrict the implementation to variables guaranteed to
>work (e.g. by checking whether the objfile passsed to
>fetch_tls_load_module_address corresponds to the main
>executable or an initially loaded library).

Thanks for letting me know this. I have implemented it in two patches and sent the same.


v1-0002-Add-TLS-support-for-shared-libraries-in-AIX.patch

v2-0001-Add-TLS-variable-debug-support-for-AIX-64-bit-XCO.patch

Where

v2-0001-Add-TLS-variable-debug-support-for-AIX-64-bit-XCO.patch  - Now just blocks shared library thread local variable computation


v1-0002-Add-TLS-support-for-shared-libraries-in-AIX.patch - Where we compute thread local variable for shared library.


Let me know what you think and kindly give me feedback for the same.


Have a nice day.


Thanks and regards,

Aditya.

[-- Attachment #2: Type: text/html, Size: 6016 bytes --]

      reply	other threads:[~2026-08-03 11:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29  9:33 Aditya Vidyadhar Kamath
2026-07-29 13:16 ` Ulrich Weigand
2026-08-03 11:04   ` 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=LV8PR15MB6488EA9A6761B30855C2E391D6D52@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