typedef BP_MANIPULATION (s390_break_insn) s390_breakpoint;
+/* Types. */
+
+/* Implement the gdbarch type alignment method. */
+
+static ULONGEST
+s390_type_align (gdbarch *gdbarch, struct type *t)
+{
+ t = check_typedef (t);
+
+ if (TYPE_LENGTH (t) > 8)
+ {
+ switch (TYPE_CODE (t))
+ {
+ case TYPE_CODE_INT:
+ case TYPE_CODE_RANGE:
+ case TYPE_CODE_FLT:
+ case TYPE_CODE_ENUM:
+ case TYPE_CODE_CHAR:
+ case TYPE_CODE_BOOL:
+ case TYPE_CODE_DECFLOAT:
+ return 8;
+
+ case TYPE_CODE_ARRAY:
+ if (TYPE_VECTOR (t))
+ return 8;
+ break;
+ }
+ }
+ return 0;
+}
+
/* Decoding S/390 instructions. */
/* Read a single instruction from address AT. */
struct target_section *secp;
secp = target_section_by_addr (current_top_target (), addr.k);
if (secp != NULL
- && (bfd_get_section_flags (secp->the_bfd_section->owner,
- secp->the_bfd_section)
- & SEC_READONLY))
+ && (bfd_section_flags (secp->the_bfd_section) & SEC_READONLY))
return pv_constant (read_memory_integer (addr.k, size,
data->byte_order));
}
catch (const gdb_exception_error &ex)
{
if (ex.error != NOT_AVAILABLE_ERROR)
- throw_exception (ex);
+ throw;
}
return info;
set_gdbarch_long_double_bit (gdbarch, 128);
set_gdbarch_long_double_format (gdbarch, floatformats_ia64_quad);
+ set_gdbarch_type_align (gdbarch, s390_type_align);
+
/* Breakpoints. */
/* Amount PC must be decremented by after a breakpoint. This is
often the number of bytes returned by gdbarch_breakpoint_from_pc but not