Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Rewrite default_get_ada_task_ptid
Date: Wed, 23 Sep 2026 13:01:58 -0600	[thread overview]
Message-ID: <87pky3iyft.fsf@tromey.com> (raw)
In-Reply-To: <20260814201003.3972985-1-tromey@adacore.com> (Tom Tromey's message of "Fri, 14 Aug 2026 14:10:03 -0600")

>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:

Tom> Internal testing on a somewhat unusual configuration lead me to
Tom> examine default_get_ada_task_ptid.

Tom> This function computes a ptid in a way that, I think, maybe nothing
Tom> else in gdb uses, specifying both the LWP and the thread.  This in
Tom> turns means that Ada functionality like "info tasks" will never find
Tom> the thread corresponding to an Ada task.

Tom> This patch rewrites default_get_ada_task_ptid to use the most normal
Tom> form of ptid_t.  Redundant target-specific implementations are
Tom> removed.

I'm checking this in.

Tom> I couldn't figure out how to write a test case for this.  I had
Tom> believed that the problem arose from statically linking glibc, and
Tom> when the linux-thread-db was not pushed on the target stack; but more
Tom> testing shows that this is not in fact the problem, as
Tom> statically-linked executables work fine for me on my development
Tom> machine.  (If you're interested, you can try gdb.ada/tasks.exp with
Tom> static linking.)

It turns out that the problem was a missing backport of a patch to
handle the static linking case.  This caused gdb to call
default_get_ada_task_ptid rather than notice that the program in
question was using pthreads.

Tom

      reply	other threads:[~2026-09-23 19:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-14 20:10 Tom Tromey
2026-09-23 19:01 ` Tom Tromey [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=87pky3iyft.fsf@tromey.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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