diff options
author | John Baldwin <jhb@FreeBSD.org> | 2022-08-31 12:01:52 -0700 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2022-09-01 16:47:42 -0700 |
commit | d176ed7c9afbcebb385f9ca8626fd3de8478429c (patch) | |
tree | fcca316d729e4fbb7779775cefb6a3b2c731ae45 | |
parent | 73f3aa500431c13c76392f5376384c91c43e5d80 (diff) | |
download | fsf-binutils-gdb-d176ed7c9afbcebb385f9ca8626fd3de8478429c.zip fsf-binutils-gdb-d176ed7c9afbcebb385f9ca8626fd3de8478429c.tar.gz fsf-binutils-gdb-d176ed7c9afbcebb385f9ca8626fd3de8478429c.tar.bz2 |
value_primitive_field: Always mark capabilities lazy.
value_primitive_field copies the subrange of a non-lazy value into
the new value for a subobject. However, the value of outer objects
never contain tags. Instead, always mark new values as lazy if they
are a capability or are a structure containing a capability member.
-rw-r--r-- | gdb/value.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/value.c b/gdb/value.c index 1c0b8d5..69c17d2 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -3136,7 +3136,7 @@ value_primitive_field (struct value *arg1, LONGEST offset, else boffset = arg_type->field (fieldno).loc_bitpos () / 8; - if (value_lazy (arg1)) + if (value_lazy (arg1) || type->contains_capability ()) v = allocate_value_lazy (value_enclosing_type (arg1)); else { @@ -3169,7 +3169,8 @@ value_primitive_field (struct value *arg1, LONGEST offset, if (VALUE_LVAL (arg1) == lval_register && value_lazy (arg1)) value_fetch_lazy (arg1); - if (value_lazy (arg1)) + if (value_lazy (arg1) || type->code () == TYPE_CODE_CAPABILITY + || TYPE_CAPABILITY (type)) v = allocate_value_lazy (type); else { |