+/* gdbarch initialization for Windows on AMD64. */
+
+static void
+amd64_windows_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ amd64_windows_init_abi_common (info, gdbarch);
+ windows_init_abi (info, gdbarch);
+
+ /* On Windows, "long"s are only 32bit. */
+ set_gdbarch_long_bit (gdbarch, 32);
+}
+
+/* gdbarch initialization for Cygwin on AMD64. */
+
+static void
+amd64_cygwin_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+{
+ amd64_windows_init_abi_common (info, gdbarch);
+ cygwin_init_abi (info, gdbarch);
+}
+
+static gdb_osabi
+amd64_windows_osabi_sniffer (bfd *abfd)
+{
+ const char *target_name = bfd_get_target (abfd);
+
+ if (!streq (target_name, "pei-x86-64"))
+ return GDB_OSABI_UNKNOWN;
+
+ if (is_linked_with_cygwin_dll (abfd))
+ return GDB_OSABI_CYGWIN;
+
+ return GDB_OSABI_WINDOWS;
+}
+
+void _initialize_amd64_windows_tdep ();