CORE_ADDR
extract_typed_address (const gdb_byte *buf, struct type *type)
{
- if (!type->is_pointer_or_reference ())
- internal_error (_("extract_typed_address: "
- "type is not a pointer or reference"));
-
+ gdb_assert (type->is_pointer_or_reference ());
return gdbarch_pointer_to_address (type->arch (), type, buf);
}
void
store_typed_address (gdb_byte *buf, struct type *type, CORE_ADDR addr)
{
- if (!type->is_pointer_or_reference ())
- internal_error (_("store_typed_address: "
- "type is not a pointer or reference"));
-
+ gdb_assert (type->is_pointer_or_reference ());
gdbarch_address_to_pointer (type->arch (), type, buf, addr);
}