From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MPNyAxcIEWgmTAwAWB0awg (envelope-from ) for ; Tue, 29 Apr 2025 13:10:47 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Frgu68gw; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id E78331E114; Tue, 29 Apr 2025 13:10:46 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,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 server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 2AF561E100 for ; Tue, 29 Apr 2025 13:10:46 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D463F3858D3C for ; Tue, 29 Apr 2025 17:10:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D463F3858D3C Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Frgu68gw Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 1A90A3858431 for ; Tue, 29 Apr 2025 17:09:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1A90A3858431 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1A90A3858431 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1745946548; cv=none; b=ata/a4U1NyuZjRMtpUIgE/S1EGQDZyZM0TV94KZHibBIx7w1PtsJElOgz5cW9JtCxuJrM+Ni4D5zKnefar7A6gbDtyg/hf3ym6kAyF3es5QOmbb5kb18BvxXgY/n+DzEwd6QtO4JU/csDK/2AaCccwI0i68jbWF8l/zwG582cA8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1745946548; c=relaxed/simple; bh=Mtb5ZIufeaJSyospi4KJqS52yn0Go49myuT5g4MdlDs=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=WhbotUtSYnM223f1RiSjJT3FGK4mKypMZtrmI9qbHnSNwXSkIf6DWCQBci0wSBXz+0RxbCgRvg1wi77RqEObRnkheAu+R9/jx+vOvns18n0rMPKbaMIBYciUeq/ysC0rPxV8v1O1XaAnYkr0qcTMq0E0Jo7K+pBbDdKmOfGDcuE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1A90A3858431 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1745946547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HIaqpzxrMywLMjrkrZxTYHQ6gHzJQcbPq7dUxgpTZbI=; b=Frgu68gwZwn9BGB8AMFsnyFCe1YZ7pVvfPm3CcwDEIz2ESqtokKA/5fbreRlvsh5MzwM9M Do4gO8wK5SbiAZ1R/4UWK4I1DJLRc6+RFi8vkmQMqsbxS7XHnU04v6f1CYrZXec1oBecf2 mvcUrw7Qh12MSj2/ELucba0g4H/iMmI= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-407-iAoKnbMGMoG0TMmCKLOlVw-1; Tue, 29 Apr 2025 13:09:06 -0400 X-MC-Unique: iAoKnbMGMoG0TMmCKLOlVw-1 X-Mimecast-MFC-AGG-ID: iAoKnbMGMoG0TMmCKLOlVw_1745946545 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 846C31800360; Tue, 29 Apr 2025 17:09:05 +0000 (UTC) Received: from f41-zbm-amd (unknown [10.22.80.66]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7AAA6180045C; Tue, 29 Apr 2025 17:09:04 +0000 (UTC) Date: Tue, 29 Apr 2025 10:09:00 -0700 From: Kevin Buettner To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Handle base type without DW_AT_byte_size Message-ID: <20250429100900.23ff8e0e@f41-zbm-amd> In-Reply-To: <20250425141813.826220-1-tromey@adacore.com> References: <20250425141813.826220-1-tromey@adacore.com> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: D5KPcuQOgM6z6W9aIc_29Y-DRxO8GvG7lKws32xtpyw_1745946545 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Fri, 25 Apr 2025 08:18:13 -0600 Tom Tromey wrote: > DWARF says that a base type can have DW_AT_bit_size, without > DW_AT_byte_size. However, gdb does not correctly handle this; in > fact, it crashes, as pointed out in this LLVM merge request: > > https://github.com/llvm/llvm-project/pull/137123 > > This patch reworks the base type size logic a bit to handle this > situation. > --- > gdb/dwarf2/read.c | 67 > ++++++++++++++++------------ gdb/testsuite/gdb.dwarf2/intbits.c | > 3 ++ gdb/testsuite/gdb.dwarf2/intbits.exp | 19 +++++++- > 3 files changed, 59 insertions(+), 30 deletions(-) I've verified that the new tests fail with an unpatched GDB and pass with your patch. Also, the patch itself LGTM. Tested-by: Kevin Buettner Approved-by: Kevin Buettner