mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 04:00:07 +08:00
Add lval_funcs::is_optimized_out
This adds an is_optimized_out function pointer to lval_funcs, and changes value_optimized_out to call it. This new function lets gdb determine if a value is optimized out without necessarily fetching the value. This is needed for a subsequent patch, where an attempt to access a lazy value would fail due to the value size limit -- however, the access was only needed to determine the optimized-out state.
This commit is contained in:
@ -264,6 +264,12 @@ struct lval_funcs
|
||||
TOVAL is not considered as an lvalue. */
|
||||
void (*write) (struct value *toval, struct value *fromval);
|
||||
|
||||
/* Return true if any part of V is optimized out, false otherwise.
|
||||
This will only be called for lazy values -- if the value has been
|
||||
fetched, then the value's optimized-out bits are consulted
|
||||
instead. */
|
||||
bool (*is_optimized_out) (struct value *v);
|
||||
|
||||
/* If non-NULL, this is used to implement pointer indirection for
|
||||
this value. This method may return NULL, in which case value_ind
|
||||
will fall back to ordinary indirection. */
|
||||
|
Reference in New Issue
Block a user