From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id bKQlJ0UitGqZuTgAWB0awg (envelope-from ) for ; Wed, 23 Sep 2026 15:02:29 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=aYkL5IdP; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 8D8491E06B; Wed, 23 Sep 2026 15:02:29 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 41D9D1E01F for ; Wed, 23 Sep 2026 15:02:27 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5F3D94BB3BCE for ; Wed, 23 Sep 2026 19:02:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F3D94BB3BCE Authentication-Results: sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=aYkL5IdP Received: from mail-oi2-x10.google.com (mail-oi2-x10.google.com [IPv6:2607:f8b0:4864:32::10]) by sourceware.org (Postfix) with ESMTPS id 807844BB24E1 for ; Wed, 23 Sep 2026 19:02:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 807844BB24E1 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 807844BB24E1 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:32::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790190121; cv=none; b=tut+I7Cuv2YJ4SkIyiIjIyEpUongKPosNb54ey7h/ghu/hreIUguAEIuCbl26rwRfXznXxmdld+MDHjEJU8SVCzp2eldv5YYxZLsrgmFeF5Rbkh6iBZhBdl/K3OEGpdeNCiqcqVP++9SsmQTCXNLU10fYybf29LCnZ09kMb69OI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1790190121; c=relaxed/simple; bh=gU8HAGWemTKvccD1SqQer9zxJFlSPGyaPfccNlhnLng=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=cfjChlENFHWIvzBQmNY38tkn4e8xcjpLRE46KBE5lT1aaX92ew9iiMHpz/cZQfFVK87fo6QfsXS8ZQjLvdlpaRq7i1ClXsTzIVwY2kQRRi3QYDfh+6nHrrrGfPM5fzq2MiN0ufV5FUIQHom3m6J1q6+cII0CPnlaAPyw2rygR9Q= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, secure) header.d=adacore.com header.i=@adacore.com header.a=rsa-sha256 header.s=google header.b=aYkL5IdP DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 807844BB24E1 Received: by mail-oi2-x10.google.com with SMTP id 5614622812f47-4c2c368cb3bso739511b6e.3 for ; Wed, 23 Sep 2026 12:02:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1790190120; x=1790794920; darn=sourceware.org; h=content-type:mime-version:user-agent:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=nzUCvFM/N2EDsKWf5GJPs+m+MZI81S0JTOWUgqv+gvw=; b=aYkL5IdP5CcdMiDhlHwiIViaBI+++wqnvzWpx+uRozeiScu/VLD9QfBzxZkRGhmQAd 9KT93uxl4avaVCNJhvIq3nBISTI3kLc+9qcog7AphzV0WDs0FYW38mopvxISRHQ0z28s EBsffrKAqUBroISdjJm43gAe5DqBrkZxrSbHt7kReZnLRXnthfysjKoAOBgs2qinLzu1 oFCj82AOp869EV0hjjG/1b/oQpYqshNU/OGK6cbkP9eCAc/8nI8GTdjB1uqlskRE7kdD cECFCZQ+COn20ViS6ub9N4IfhYhxVWVzH/jY9YJVUgjgkVnJi6HoQD05u4BtApo/lczt /V/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790190120; x=1790794920; h=content-type:mime-version:user-agent:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=nzUCvFM/N2EDsKWf5GJPs+m+MZI81S0JTOWUgqv+gvw=; b=irQRf8NJHuN8zQNDxTpNOa23yfSdNdpss1CVdxqJNulbZ8l6Kl1w//Lq1m9AoRdDda H2t/6K1+B/KBEbvSOarc5QsW7gNmB4QXLMigFByOyWx7vMmzFCm34ttBOTnq7YEckOnp Ei/HlFN0HCXt1qUIP97XgYc3pZc8y6MkWBbKINGV1pNUIblHiqP73L2tyo963dSoINrw 8zGzDkLIV+MTQsCuApRaoAx3OLwVWpS8/K74iG7PeRuch7yKXeh7oicxevcOtnBFRFOQ bSEIhdDZZAsbpPpeM9csf/gCOJv0xgK1O3WFCWu1UE/5pHCTcV4UjSdwxEL+O/BIy4Ry rNFw== X-Gm-Message-State: AFuF++k3gtwcw1TTCDkHmk7SfRqm2FvB4FSlya4S8MKEguPTeFbA4ZKK 0XH7mpwHWmq/5HZZnTmTiK34KI8owknfzSXye7Thvb3LXHKQMivjzO796IBo/n7Em9BEOhhxNrl rZ5PjXQ== X-Gm-Gg: AYBFou0/4forGK2nZpUqQJi7lYrPWF05Y0p/ITUUGw8bT9mVAnxuPXijXL+umb8/ddj nTbxVtjaDdxX1xcG344dvRkt7NPBKebJiSR42uvPd7hXaoWqkfmhzwL9FImlXP2VlmHdpu0iJRt 10wFz5IxSOiRUI4R/lRbGD78vcKRK0cOB71tNZoUMbmThTkcvuzQpuJob4TLc3PUkHmnhVR3cY0 VQ6EB4NpcYUSoPzBB1eebf9ioAlmbKjMbh9zVLxXNqMVm2uINHEcFhoNoqLczJoU5LThtNc+uhU jSzytHS7M9vCPW0wLHeJwf8qfhglNKTvdMzFF3cKjy3yx7Gv/q8pPeZEjYxMRkp8mqL3ZDGyUYi +RJkB4iQJFspb2fixCLqPcmSLUds01Qkny6A3/fD7VreZOsnHk8GgBSDtDSZXiWB3aNSaFeYpUF urOWtWQjGhQq07wIPR83jjf5EKr1VepDiep7SBRzFoM2zJQoX+hbCDx68CKPVRmaURY02GrcOnq cp8hy63Z2DkFsf8DTcmO+kELLRF7A== X-Received: by 2002:a05:6808:1816:b0:4cb:f21b:6f95 with SMTP id 5614622812f47-4d73045f8b7mr62739b6e.40.1790190120397; Wed, 23 Sep 2026 12:02:00 -0700 (PDT) Received: from bapiya (75-166-229-74.hlrn.qwest.net. [75.166.229.74]) by smtp.gmail.com with ESMTPSA id 5614622812f47-4d5c4bf8e14sm3010172b6e.14.2026.09.23.12.01.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Sep 2026 12:01:59 -0700 (PDT) From: Tom Tromey To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Rewrite default_get_ada_task_ptid In-Reply-To: <20260814201003.3972985-1-tromey@adacore.com> (Tom Tromey's message of "Fri, 14 Aug 2026 14:10:03 -0600") References: <20260814201003.3972985-1-tromey@adacore.com> X-Attribution: Tom Date: Wed, 23 Sep 2026 13:01:58 -0600 Message-ID: <87pky3iyft.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org >>>>> "Tom" == Tom Tromey 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