mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04:00
[gdb] Add error_value_not_available
Add error_value_not_available, and use it.
This commit is contained in:
parent
519774805a
commit
667dbe23e9
3 changed files with 12 additions and 3 deletions
|
|
@ -1227,8 +1227,7 @@ value_assign (struct value *toval, struct value *fromval)
|
|||
if (optim)
|
||||
error_value_optimized_out ();
|
||||
if (unavail)
|
||||
throw_error (NOT_AVAILABLE_ERROR,
|
||||
_("value is not available"));
|
||||
error_value_not_available ();
|
||||
}
|
||||
|
||||
modify_field (type, buffer, value_as_long (fromval),
|
||||
|
|
|
|||
|
|
@ -1127,6 +1127,12 @@ error_value_optimized_out (void)
|
|||
throw_error (OPTIMIZED_OUT_ERROR, _("value has been optimized out"));
|
||||
}
|
||||
|
||||
void
|
||||
error_value_not_available ()
|
||||
{
|
||||
throw_error (NOT_AVAILABLE_ERROR, _("value is not available"));
|
||||
}
|
||||
|
||||
void
|
||||
value::require_not_optimized_out () const
|
||||
{
|
||||
|
|
@ -1144,7 +1150,7 @@ void
|
|||
value::require_available () const
|
||||
{
|
||||
if (!m_unavailable.empty ())
|
||||
throw_error (NOT_AVAILABLE_ERROR, _("value is not available"));
|
||||
error_value_not_available ();
|
||||
}
|
||||
|
||||
gdb::array_view<const gdb_byte>
|
||||
|
|
|
|||
|
|
@ -987,6 +987,10 @@ struct lval_funcs
|
|||
|
||||
[[noreturn]] extern void error_value_optimized_out ();
|
||||
|
||||
/* Throw an error complaining that the value is not available. */
|
||||
|
||||
[[noreturn]] extern void error_value_not_available ();
|
||||
|
||||
/* Pointer to internal variable. */
|
||||
#define VALUE_INTERNALVAR(val) (*((val)->deprecated_internalvar_hack ()))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue