This makes GDB happy when trying to convert to/from capabilities from
long types.
gdb/ChangeLog:
2020-10-20 Luis Machado <luis.machado@arm.com>
* findvar.c (extract_typed_address): Handle capabilities.
(store_typed_address): Likewise.
* value.c (unpack_long): Likewise.
(pack_long): Likewise.
/* Return true if this is a pointer or reference type. */
bool is_pointer_or_reference () const
{
- return this->code () == TYPE_CODE_PTR || TYPE_IS_REFERENCE (this);
+ return this->code () == TYPE_CODE_PTR
+ || this->code () == TYPE_CODE_CAPABILITY || TYPE_IS_REFERENCE (this);
}
/* * Type that is a pointer to this type.
case TYPE_CODE_PTR:
case TYPE_CODE_REF:
case TYPE_CODE_RVALUE_REF:
+ case TYPE_CODE_CAPABILITY:
/* Assume a CORE_ADDR can fit in a LONGEST (for now). Not sure
whether we want this to be true eventually. */
return extract_typed_address (valaddr, type);
case TYPE_CODE_REF:
case TYPE_CODE_RVALUE_REF:
case TYPE_CODE_PTR:
+ case TYPE_CODE_CAPABILITY:
store_typed_address (buf, type, (CORE_ADDR) num);
break;