From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org, Tom de Vries <tdevries@suse.de>
Subject: Re: [PATCH] gdb: fixes for DW_OP_entry_value when inferior is at entry point
Date: Wed, 02 Sep 2026 13:14:28 -0600 [thread overview]
Message-ID: <87y0dj4ga3.fsf@tromey.com> (raw)
In-Reply-To: <bb0d810f4f3fd8bba97267e6cc8d207d684e1408.1787864658.git.aburgess@redhat.com> (Andrew Burgess's message of "Thu, 27 Aug 2026 22:04:55 +0100")
>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
Andrew> This fixes some issues with DW_OP_entry_value which are discussed in
Andrew> PR gdb/34571.
Thanks for doing this.
Andrew> To understand the fix for this bug we need to first revisit the
Andrew> earlier commit that introduced the bug:
Andrew> commit 1bafda2c4595f0f936a5845caf9667b70b198091
Andrew> Date: Wed Apr 9 12:02:18 2025 +0200
Andrew> [gdb/symtab] Handle DW_OP_entry_value at function entry
I appreciate the research and commentary as well.
Looking at this code, I don't really follow why there's even such a
large special case for trivial_entry_value. It seems like the code
could be much simpler: when seeing a DW_OP_entry_value, evaluate the
entry value expression in the target frame -- either the parent frame,
or for the trivial_entry_value case, the current frame.
That is, these special checks and calls to dwarf_block_to_dwarf_reg and
dwarf_block_to_dwarf_reg_deref (which to be clear predate the
trivial_entry_value patch) also seem totally unnecessary, as does this
restriction:
error (_("DWARF-2 expression error: DW_OP_entry_value is "
"supported only for single DW_OP_reg* "
"or for DW_OP_breg*(0)+DW_OP_deref*"));
That said, I don't think there's anything wrong with an improvement that
doesn't rewrite it all. And anyway maybe there's some subtlety I don't
understand.
Approved-By: Tom Tromey <tom@tromey.com>
thanks,
Tom
next prev parent reply other threads:[~2026-09-02 19:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 21:04 Andrew Burgess
2026-09-02 19:14 ` Tom Tromey [this message]
2026-09-03 15:41 ` Andrew Burgess
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=87y0dj4ga3.fsf@tromey.com \
--to=tom@tromey.com \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
/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