/* Offsets into the struct i386_thread_state where we'll find the saved regs.
From <mach/i386/thread_status.h> and i386-tdep.h. */
/* Offsets into the struct i386_thread_state where we'll find the saved regs.
From <mach/i386/thread_status.h> and i386-tdep.h. */
return TYPE_LENGTH (type);
/* 4. The caller places all the fields of structures (or unions) with no
vector elements in the parameter area. These structures are 4-byte
aligned.
5. The caller places structures with vector elements on the stack,
16-byte aligned. */
return TYPE_LENGTH (type);
/* 4. The caller places all the fields of structures (or unions) with no
vector elements in the parameter area. These structures are 4-byte
aligned.
5. The caller places structures with vector elements on the stack,
16-byte aligned. */
- for (i = 0; i < TYPE_NFIELDS (type); i++)
- res = max (res,
- i386_darwin_arg_type_alignment (TYPE_FIELD_TYPE (type, i)));
+ for (i = 0; i < type->num_fields (); i++)
+ {
+ int align
+ = i386_darwin_arg_type_alignment (TYPE_FIELD_TYPE (type, i));
+
+ res = std::max (res, align);
+ }
i386_darwin_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
i386_darwin_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
struct regcache *regcache, CORE_ADDR bp_addr,
int nargs, struct value **args, CORE_ADDR sp,
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
/* Finally, update the stack pointer... */
store_unsigned_integer (buf, 4, byte_order, sp);
/* Finally, update the stack pointer... */
store_unsigned_integer (buf, 4, byte_order, sp);
/* MarkK wrote: This "+ 8" is all over the place:
(i386_frame_this_id, i386_sigtramp_frame_this_id,
/* MarkK wrote: This "+ 8" is all over the place:
(i386_frame_this_id, i386_sigtramp_frame_this_id,
{
gdbarch_register_osabi_sniffer (bfd_arch_unknown, bfd_target_mach_o_flavour,
i386_mach_o_osabi_sniffer);
{
gdbarch_register_osabi_sniffer (bfd_arch_unknown, bfd_target_mach_o_flavour,
i386_mach_o_osabi_sniffer);