From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id AdrTACUUP2oM0hkAWB0awg (envelope-from ) for ; Fri, 26 Jun 2026 20:07:01 -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=TOqHPxcB; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id E9F7E1E098; Fri, 26 Jun 2026 20:07:00 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.1 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,RCVD_IN_SBL_CSS,WEIRD_PORT 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 05D1E1E070 for ; Fri, 26 Jun 2026 20:07:00 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1246F4BA2E35 for ; Sat, 27 Jun 2026 00:06:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1246F4BA2E35 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=TOqHPxcB 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 2AC264BA2E15 for ; Sat, 27 Jun 2026 00:06:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2AC264BA2E15 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 2AC264BA2E15 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1782518791; cv=none; b=QpbBgy4Xh5fwFydk6RXLU7vKXNomP/8Kd96iDtO0j+tbyLjUbyBZ0WgpLZHxjwRpDLq0DWVQS5AWJUhrK6a8kHSpHvwbiK49dbxuaqFsluGYCr0HlLrma41cP5u1AKp600aoKzMbxXpzGMRfXU+QPoMK1jTLUa+ZLcem+Tx09bE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1782518791; c=relaxed/simple; bh=mfGNX4XGOqhqdHJwOfUskbTBFNpbeHQmm24MqvDuMRU=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=wQ0Wy0SuRtj6yxOxv2HZM6HN6XGTCsxgGBU67S0uCdslr/1sYvVPC1+Wu7cfiJYz0sjlRVu4PxwR9P5jr0hrrVf4lNtLJ3PHLGUkFiIHJqTXrWXKu2CuKtmsVxTye9rTr2sRcsSSM7NthRo+Xo/CE+aHcwKJiTbVSAudnl45JcQ= ARC-Authentication-Results: i=1; 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=TOqHPxcB DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2AC264BA2E15 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1782518790; 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=ctQtJuVmPW3oQm5sXIBpPlo9bpK8Xj0lLv556BRo1Gs=; b=TOqHPxcBvla3xV8z9XotBSFy9nCV1grnlo+nCwa/T+e+gtpOEFQ2QOx9y8cMg+KL1DuFYM KM2tvgGE2FGoQr9u7cJ/2uZAaNXQ+zP7scYpuXmDs7powZi95/MSSP15vUtC/VW1hvo55S ufZ0AlxXwR6zejWehMmJrYK2scIlYtY= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-637-qjfPZPM0NVSZZprdDQhYxQ-1; Fri, 26 Jun 2026 20:06:29 -0400 X-MC-Unique: qjfPZPM0NVSZZprdDQhYxQ-1 X-Mimecast-MFC-AGG-ID: qjfPZPM0NVSZZprdDQhYxQ_1782518788 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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5BA841955F7F for ; Sat, 27 Jun 2026 00:06:28 +0000 (UTC) Received: from f44-mesa-1 (unknown [10.22.88.58]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1EC841800598; Sat, 27 Jun 2026 00:06:26 +0000 (UTC) Date: Fri, 26 Jun 2026 17:06:24 -0700 From: Kevin Buettner To: Keith Seitz Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v2] Add infcall support for C++ constructor-style expressions Message-ID: <20260626170308.69c33832@f44-mesa-1> In-Reply-To: References: 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: bgQIL7FZXet0BCwluJBo8YQ4LtECgmbN7dmYrDSZ7NE_1782518788 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 Hi Keith, On Mon, 27 Apr 2026 09:43:08 -0700 Keith Seitz wrote: > Changes in v2: > - Formatting fixes > - Use c_isspace to skip whitespace in typename_token_for() > - Merged rules for typename_for_ctor to type_exp > [This adds ~20 shift/reduce conflicts.] > - Updated error message when overload-resolution is off > - Handle static constructors and add new tests for this case > - Added test case for when ctor is not found > - Test early return: remove integer return status Claude found this problem... Using this two line program, which it named /tmp/test_c.c: struct S { int x; }; int main() { struct S s = {42}; return s.x; } ...do: gcc -g -o /tmp/test_c /tmp/test_c.c Then: kevinb-claude@claude-1:bin$ ./gdb -q (gdb) file /tmp/test_c Reading symbols from /tmp/test_c... (gdb) start Temporary breakpoint 1 at 0x40044a: file /tmp/test_c.c, line 2. Starting program: /tmp/test_c This GDB supports auto-downloading debuginfo from the following URLs: Enable debuginfod for this session? (y or [n]) n Debuginfod has been disabled. To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Temporary breakpoint 1, main () at /tmp/test_c.c:2 2 int main() { struct S s = {42}; return s.x; } (gdb) print typeof(struct S)(42) /home/kevinb-claude/binutils-gdb-patch-review/gdb/eval.c:1885: internal-error: evaluate_funcall: Assertion `exp->language_defn->la_language == language_cplus' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. ----- Backtrace ----- 0x51e699 gdb_internal_backtrace_1 /home/kevinb-claude/binutils-gdb-patch-review/gdb/bt-utils.c:122 0x51e699 _Z22gdb_internal_backtracev /home/kevinb-claude/binutils-gdb-patch-review/gdb/bt-utils.c:173 0x9fb874 internal_vproblem /home/kevinb-claude/binutils-gdb-patch-review/gdb/utils.c:434 0x9fbd38 _Z15internal_verrorPKciS0_P13__va_list_tag /home/kevinb-claude/binutils-gdb-patch-review/gdb/utils.c:514 0xb6cea1 _Z18internal_error_locPKciS0_z /home/kevinb-claude/binutils-gdb-patch-review/gdbsupport/errors.cc:57 0x67e31c _ZN4expr14type_operation16evaluate_funcallEP4typeP10expression6nosideRKSt6vectorISt10unique_ptrINS_9operationESt14default_deleteIS8_EESaISB_EE ... Claude also complained about the 20 new shift/reduce conflicts. It recommends reverting to a dedicated non-terminal for TYPENAME_CTOR instead of routing through type_exp. (It showed some code too, but I don't want to taint your contribution by showing you AI generated code.) Claude says that, if done right, that change could fix both problems at once. Kevin