From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ADYbDIUwC2oNrwUAWB0awg (envelope-from ) for ; Mon, 18 May 2026 11:30:13 -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=RioM5pOd; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 207391E024; Mon, 18 May 2026 11:30:13 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.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,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 5C18C1E024 for ; Mon, 18 May 2026 11:30:12 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 981904BB1C25 for ; Mon, 18 May 2026 15:30:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 981904BB1C25 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=RioM5pOd Received: from mail-oo1-xc35.google.com (mail-oo1-xc35.google.com [IPv6:2607:f8b0:4864:20::c35]) by sourceware.org (Postfix) with ESMTPS id F2FB84BA2E0A for ; Mon, 18 May 2026 15:29:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F2FB84BA2E0A 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 F2FB84BA2E0A Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c35 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779118189; cv=none; b=DXuEp9WVqKnvtv5tcR5QVPtEuFJsdlpyIF33jhR+9mNOUPHQU3Vwvjzgwwbix73Qz6bC84ta5s8LPH+H+s//ha40B35B8xzOb1lxmFTJYGP7D6U+X/HWlrxB/UUB6eG3JmsAFsIcF6wcAXbwgxNxXqiwoOZFbBYrG85w+oIBZJg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1779118189; c=relaxed/simple; bh=UDWKcvvRH+cOXNajKR+gQgnIHEBujY4GpKWoMANGzGo=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=BWFbW77KqKWikcxPvvC+rtsq7eLTz2uAzoWKLQnWt65091OuMHcYo9J44o0DG3OlVj7dkulS36zgG9REqGKy/0kvOPTqYC31e2uz5sX5NtqGPWSeCKBILL1dgg2m8CTnEpjTAlkCR90l3BHQqa8Iq+vZhv4F8ixuKkXS9ZTfHZo= 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=RioM5pOd DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F2FB84BA2E0A Received: by mail-oo1-xc35.google.com with SMTP id 006d021491bc7-6948fb494a0so1269173eaf.2 for ; Mon, 18 May 2026 08:29:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1779118188; x=1779722988; darn=sourceware.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=vWuPfBoCLsxdhMJ2L2FkcuTaFG9RmTfQgKgvfQLQwjo=; b=RioM5pOdUvclMr4q0wU1BpDSS2bLZhVxzpnt2RB50qKM4PNBWDWt5hAlcabvnIj80k SqB/ncQUsyHyEdzkJveW/L4Cp9POf/j3UDdbWPtLXI0lPzgh0bNs9QuHRUw/ENWbZB7a /swWcuJj6xdp9Tn57cktYnlh49ZzipIYsblQrebgdzoH+30jxOouEcO/E2QUF416QQWp QgdfyKwag072enz1fWWN1Zl+In9AMQOPeCF2DpI5poArqxnp7uWHR3uJKLxMpPj/5Xoj tLJySx6oB/u1Fsf7nzusHVTHz6KBtEcolMAYy8sFrhmVDSCHRSj+SrfQ8CFBLovbfTvM M6jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779118188; x=1779722988; h=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; bh=vWuPfBoCLsxdhMJ2L2FkcuTaFG9RmTfQgKgvfQLQwjo=; b=l9z+YCucojsF0m17EpkWJBxfFIpRt239y4zO4UFQ0qrpHu7iaKWU68FelLoAoOhyjc 13SEbhVb7o7E5MzBVLYTvATRWJv+38QKqXF6GbkXDP9KwhErpCXl1MjmsTSPU3ajj37/ YzFqg5tHRVb+G0ErR4ZKiX1BRYDf4qmwu7bpUY6Bv7WpkoUapoDseoKIzblO7afF5MK6 9ocYTCoKmzROnuYrAr5gxJhtOREi78WeOVQYQkSCOM3lCBc4D/6nulLynmksO3ByTOuj VbDFJa9db2OgiZxK3utLOJ+KJz76Upy++WoI+pt3FPQ4WhUq6w2ZNK7c7XUBErzCyugP 25SA== X-Forwarded-Encrypted: i=1; AFNElJ8N79TazVFNoUzo9tygJ6Gol0HeDsiHWaC5p7+UF4C7ZSdxzgv4KMKPRzrV1TXSkXmMGIzvjyCGH6zhsA==@sourceware.org X-Gm-Message-State: AOJu0YzmhRTTVZCKH7YXiVtR7ajPM+iIdDRvXnsDpTMB1PyK7th1eEEe i4GwP4ikv5+Ux+cv8XKQq2m8I97aDPCBq56Di5s++klRRkr7Pw0kSnBVBHiwGe5MDA== X-Gm-Gg: Acq92OGpACD1IYu/tmkF0ChQVvITEB03oOSXHchLNVqSsErad8k+U6OYXO7dmxy4vAM RsjCchTQMw9db8bCDEpuuKVucW1QdxLHP5jf+U72lkPJybtXFIY40UsFen2YooF8SGrp1de0Sz3 0H0KlKKClMNEvUv2H0wcOP0AVhhnBl2ker5k5tkKinYC0pvWQeapcspa2VcRxNeGWEU2VgdI2uo 7mCe3QcKsB+m7ItYSKOPEjMBA+jKxVd8wmrlqwA81u6Bzz1Plll0YbQ9Wcj/UTPj41BknhVqY7S MkeQjjOkYjC5nVzCQ+wUYSmsn1lIDy2XUB8EwfMf+so2DWJw3GFucPHHobeEoWbIPEZ/ZOLCLpx z8hgHy3F3SjQ90RGxBvQr4OOh2Tv5goAZovAexnNm07pL5gYSaZvPOq5jGO5uKaebKgOiGvqNm8 0WEWCq8DT4yObn5Y0JglxFcBZVNWtB6RlOZ8BSD9P0BT20ohi+wUOGhA== X-Received: by 2002:a05:6820:4cc2:b0:69b:6d47:8185 with SMTP id 006d021491bc7-69c942e109cmr10046741eaf.15.1779118188047; Mon, 18 May 2026 08:29:48 -0700 (PDT) Received: from bapiya (75-166-225-82.hlrn.qwest.net. [75.166.225.82]) by smtp.gmail.com with ESMTPSA id 006d021491bc7-69d045e6646sm5775408eaf.1.2026.05.18.08.29.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2026 08:29:47 -0700 (PDT) From: Tom Tromey To: Tom Tromey Cc: Andrew Burgess , gdb-patches@sourceware.org Subject: Re: [PATCH] Handle DW_AT_encoding on DW_TAG_enumeration_type In-Reply-To: <87v7cofm5g.fsf@tromey.com> (Tom Tromey's message of "Fri, 15 May 2026 14:33:31 -0600") References: <20260513142722.3135998-1-tromey@adacore.com> <87se7scx26.fsf@redhat.com> <87v7cofm5g.fsf@tromey.com> X-Attribution: Tom Date: Mon, 18 May 2026 09:29:46 -0600 Message-ID: <87y0hgbus5.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> Now, we could change update_enumeration_type_from_children to also Tom> examine the attribute forms, with the idea that if we see DW_FORM_sdata Tom> then it is definitely signed. While that wouldn't help this particular Tom> test, it's possible to construct one where it does. In fact I happened Tom> recently to be investigating this for gnat-llvm, where there's a type: Tom> [ 10cf] enumeration_type abbrev: 21 Tom> name (strp) "tag_t" Tom> byte_size (data1) 1 Tom> decl_file (data1) p.adb (1) Tom> decl_line (data1) 20 Tom> alignment (udata) 1 Tom> ... Tom> [ 10de] enumerator abbrev: 22 Tom> name (strp) "object" Tom> const_value (sdata) 18446744073709551615 (-1) Tom> Here the enumeration type doesn't specify a sign, but there's a constant Tom> that is clearly signed. FWIW this occurs in array_of_variant.exp. Tom> I'll address this in a separate patch. I still could do this, but I'm not sure how important it really is. For gnat-llvm, after digging into this, I think this is a compiler bug and I'm going to modify the compiler to ensure that enumeration types always have an appropriately-signed base type. Tom