Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Call error_value_optimized_out from value_assign
@ 2026-04-21 19:41 Tom Tromey
  2026-04-24  9:37 ` Tom de Vries
  0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2026-04-21 19:41 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-04-24 17:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-21 19:41 [PATCH] Call error_value_optimized_out from value_assign Tom Tromey
2026-04-24  9:37 ` Tom de Vries
2026-04-24 14:37   ` Tom Tromey
2026-04-24 17:37     ` Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox