This patch fixes a couple issues around hardware watchpoint triggers related to
capabilities.
1 - When a capability changes and the hardware watchpoint triggers, Morello
GDB should display the tag state for new/old values correctly.
2 - Take the capability tag into consideration when checking for content
changes to the watched area. The 128 bits may be the same, but the tag state
may differ.
return (type1->code () == type2->code ()
&& TYPE_LENGTH (type1) == TYPE_LENGTH (type2)
&& memcmp (value_contents (arg1), value_contents (arg2),
- TYPE_LENGTH (type1)) == 0);
+ TYPE_LENGTH (type1)) == 0
+ && ((!value_tagged (arg1) && !value_tagged (arg2))
+ || (value_tagged (arg1) && value_tagged (arg2)
+ && value_tag (arg1) == value_tag (arg2))));
}
/* Simulate the C operator < by returning 1
break;
case lval_memory:
{
- struct gdbarch *gdbarch = get_type_arch (type);
- tag = gdbarch_get_cap_tag_from_address (gdbarch, value_address (val));
+ if (!value_lazy (val) && value_tagged (val))
+ tag = value_tag (val);
+ else
+ {
+ struct gdbarch *gdbarch = get_type_arch (type);
+ tag = gdbarch_get_cap_tag_from_address (gdbarch,
+ value_address (val));
+ }
}
break;
default: