{
struct type *subtype = check_typedef (type->field (i).type ());
int bitpos = TYPE_FIELD_BITPOS (type, i);
- int align = type_align(subtype);
/* Ignore static fields, empty fields (for example nested
empty structures), and bitfields (these are handled by
if (bitpos % 8 != 0)
return true;
+ int align = type_align (subtype);
+ if (align == 0)
+ error (_("could not determine alignment of type"));
+
int bytepos = bitpos / 8;
if (bytepos % align != 0)
return true;
"andq $-XXX, %rsp" can be either 4 bytes or 7 bytes:
- 0x48 0x83 0xe4 0xf0 andq $-16, %rsp
- 0x48 0x81 0xe4 0x00 0xff 0xff 0xff andq $-256, %rsp
+ 0x48 0x83 0xe4 0xf0 andq $-16, %rsp
+ 0x48 0x81 0xe4 0x00 0xff 0xff 0xff andq $-256, %rsp
*/
gdb_byte buf[18];
"andq $-XXX, %rsp" can be either 4 bytes or 7 bytes:
- 0x48 0x83 0xe4 0xf0 andq $-16, %rsp
- 0x48 0x81 0xe4 0x00 0xff 0xff 0xff andq $-256, %rsp
+ 0x48 0x83 0xe4 0xf0 andq $-16, %rsp
+ 0x48 0x81 0xe4 0x00 0xff 0xff 0xff andq $-256, %rsp
"andl $-XXX, %esp" can be either 3 bytes or 6 bytes:
- 0x83 0xe4 0xf0 andl $-16, %esp
- 0x81 0xe4 0x00 0xff 0xff 0xff andl $-256, %esp
+ 0x83 0xe4 0xf0 andl $-16, %esp
+ 0x81 0xe4 0x00 0xff 0xff 0xff andl $-256, %esp
*/
gdb_byte buf[19];
_initialize_amd64_tdep ()
{
gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64, GDB_OSABI_NONE,
- amd64_none_init_abi);
+ amd64_none_init_abi);
gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x64_32, GDB_OSABI_NONE,
- amd64_x32_none_init_abi);
+ amd64_x32_none_init_abi);
}
\f