From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH] Call error_value_optimized_out from value_assign
Date: Tue, 21 Apr 2026 13:41:48 -0600 [thread overview]
Message-ID: <20260421194148.1724135-1-tromey@adacore.com> (raw)
value_assign will throw an exception indicating that the value is
optimized out, but it seemed better to me for it to use the utility
function error_value_optimized_out.
---
gdb/valops.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gdb/valops.c b/gdb/valops.c
index 515e43ccdfa..fccadae6cf6 100644
--- a/gdb/valops.c
+++ b/gdb/valops.c
@@ -1225,8 +1225,7 @@ value_assign (struct value *toval, struct value *fromval)
&unavail))
{
if (optim)
- throw_error (OPTIMIZED_OUT_ERROR,
- _("value has been optimized out"));
+ error_value_optimized_out ();
if (unavail)
throw_error (NOT_AVAILABLE_ERROR,
_("value is not available"));
base-commit: 8927b500532538cd86aae2d777c6452c51a210c6
--
2.53.0
next reply other threads:[~2026-04-21 19:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-21 19:41 Tom Tromey [this message]
2026-04-24 9:37 ` Tom de Vries
2026-04-24 14:37 ` Tom Tromey
2026-04-24 17:37 ` Tom de Vries
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=20260421194148.1724135-1-tromey@adacore.com \
--to=tromey@adacore.com \
--cc=gdb-patches@sourceware.org \
/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