aboutsummaryrefslogtreecommitdiff
path: root/gdb/windows-tdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/windows-tdep.c')
-rw-r--r--gdb/windows-tdep.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/gdb/windows-tdep.c b/gdb/windows-tdep.c
index 0ba1472..05335d2 100644
--- a/gdb/windows-tdep.c
+++ b/gdb/windows-tdep.c
@@ -36,7 +36,6 @@
#include "gdbcore.h"
#include "coff/internal.h"
#include "libcoff.h"
-#include "solist.h"
#define CYGWIN_DLL_NAME "cygwin1.dll"
@@ -863,10 +862,25 @@ windows_get_siginfo_type (struct gdbarch *gdbarch)
return siginfo_type;
}
+/* solib_ops for Windows systems. */
+
+struct windows_solib_ops : target_solib_ops
+{
+ void create_inferior_hook (int from_tty) const override;
+};
+
+/* Return a new solib_ops for Windows systems. */
+
+static solib_ops_up
+make_windows_solib_ops ()
+{
+ return std::make_unique<windows_solib_ops> ();
+}
+
/* Implement the "solib_create_inferior_hook" solib_ops method. */
-static void
-windows_solib_create_inferior_hook (int from_tty)
+void
+windows_solib_ops::create_inferior_hook (int from_tty) const
{
CORE_ADDR exec_base = 0;
@@ -911,8 +925,6 @@ windows_solib_create_inferior_hook (int from_tty)
}
}
-static solib_ops windows_so_ops;
-
/* Common parts for gdbarch initialization for the Windows and Cygwin OS
ABIs. */
@@ -929,10 +941,7 @@ windows_init_abi_common (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_iterate_over_objfiles_in_search_order
(gdbarch, windows_iterate_over_objfiles_in_search_order);
- windows_so_ops = solib_target_so_ops;
- windows_so_ops.solib_create_inferior_hook
- = windows_solib_create_inferior_hook;
- set_gdbarch_so_ops (gdbarch, &windows_so_ops);
+ set_gdbarch_make_solib_ops (gdbarch, make_windows_solib_ops);
set_gdbarch_get_siginfo_type (gdbarch, windows_get_siginfo_type);
}
@@ -1183,9 +1192,7 @@ windows_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
return normal_pid_to_str (ptid);
}
-void _initialize_windows_tdep ();
-void
-_initialize_windows_tdep ()
+INIT_GDB_FILE (windows_tdep)
{
init_w32_command_list ();
cmd_list_element *info_w32_thread_information_block_cmd