+2020-03-16 Simon Marchi <simon.marchi@efficios.com>
+
+ PR gdb/21500
+ * amd64-windows-tdep.c (amd64_windows_init_abi): Rename
+ to...
+ (amd64_windows_init_abi_common): ... this. Don't set size of
+ long type.
+ (amd64_windows_init_abi): New function.
+ (amd64_cygwin_init_abi): New function.
+ (_initialize_amd64_windows_tdep): Use amd64_cygwin_init_abi for
+ the Cygwin OS ABI.
+ * i386-windows-tdep.c (_initialize_i386_windows_tdep): Clarify
+ comment.
+
2020-03-16 Simon Marchi <simon.marchi@efficios.com>
* windows-tdep.h (is_linked_with_cygwin_dll): New declaration.
}
static void
-amd64_windows_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+amd64_windows_init_abi_common (gdbarch_info info, struct gdbarch *gdbarch)
{
/* The dwarf2 unwinder (appended very early by i386_gdbarch_init) is
preferred over the SEH one. The reasons are:
windows_init_abi (info, gdbarch);
- /* On Windows, "long"s are only 32bit. */
- set_gdbarch_long_bit (gdbarch, 32);
-
/* Function calls. */
set_gdbarch_push_dummy_call (gdbarch, amd64_windows_push_dummy_call);
set_gdbarch_return_value (gdbarch, amd64_windows_return_value);
set_gdbarch_auto_wide_charset (gdbarch, amd64_windows_auto_wide_charset);
}
+static void
+amd64_windows_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ amd64_windows_init_abi_common (info, gdbarch);
+
+ /* On Windows, "long"s are only 32bit. */
+ set_gdbarch_long_bit (gdbarch, 32);
+}
+
+static void
+amd64_cygwin_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ amd64_windows_init_abi_common (info, gdbarch);
+}
+
static gdb_osabi
amd64_windows_osabi_sniffer (bfd *abfd)
{
void
_initialize_amd64_windows_tdep ()
{
- /* The Cygwin and Windows OS ABIs are currently equivalent. */
gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64, GDB_OSABI_WINDOWS,
amd64_windows_init_abi);
gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64, GDB_OSABI_CYGWIN,
- amd64_windows_init_abi);
+ amd64_cygwin_init_abi);
gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_coff_flavour,
amd64_windows_osabi_sniffer);
gdbarch_register_osabi_sniffer (bfd_arch_i386, bfd_target_elf_flavour,
i386_cygwin_core_osabi_sniffer);
- /* The Windows and Cygwin OS ABIs are currently equivalent. */
+ /* The Windows and Cygwin OS ABIs are currently equivalent on i386. */
gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_WINDOWS,
i386_windows_init_abi);
gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_CYGWIN,