From: Kevin Buettner <kevinb@redhat.com>
To: Keith Seitz <keiths@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Add infcall support for C++ constructor-style expressions
Date: Fri, 26 Jun 2026 17:06:24 -0700 [thread overview]
Message-ID: <20260626170308.69c33832@f44-mesa-1> (raw)
In-Reply-To: <b05ccda6e18b209f96401f7c4505b3a6690c5016.1777307103.git.keiths@redhat.com>
Hi Keith,
On Mon, 27 Apr 2026 09:43:08 -0700
Keith Seitz <keiths@redhat.com> 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:
<ima:enforcing>
<https://debuginfod.fedoraproject.org/>
<ima:ignore>
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
next prev parent reply other threads:[~2026-06-27 0:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 19:17 [PATCH] " Keith Seitz
2026-03-27 5:50 ` Eli Zaretskii
2026-04-21 13:41 ` Andrew Burgess
2026-04-21 18:13 ` Keith Seitz
2026-04-27 16:43 ` [PATCH v2] " Keith Seitz
2026-06-19 17:21 ` Keith Seitz
2026-06-27 0:06 ` Kevin Buettner [this message]
2026-07-29 17:44 ` Keith Seitz
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=20260626170308.69c33832@f44-mesa-1 \
--to=kevinb@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=keiths@redhat.com \
/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