gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gdb / ia64-vms-tdep.c
index 859c0b46bff2bdccc0888f28eb94391fc7a45eee..ca0317bc45b39fb78d32798f5a9c40f11b0ea58d 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for OpenVMS IA-64.
 
-   Copyright (C) 2012 Free Software Foundation, Inc.
+   Copyright (C) 2012-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -23,6 +23,7 @@
 #include "osabi.h"
 #include "gdbtypes.h"
 #include "gdbcore.h"
+#include "gdbarch.h"
 
 #ifdef HAVE_LIBUNWIND_IA64_H
 
@@ -33,16 +34,14 @@ ia64_vms_find_proc_info_x (unw_addr_space_t as, unw_word_t ip,
                            unw_proc_info_t *pi,
                            int need_unwind_info, void *arg)
 {
-  enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch);
-  unw_dyn_info_t di;
-  int ret;
+  enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
   gdb_byte buf[32];
   const char *annex = core_addr_to_string (ip);
   LONGEST res;
   CORE_ADDR table_addr;
   unsigned int info_len;
 
-  res = target_read (&current_target, TARGET_OBJECT_OPENVMS_UIB,
+  res = target_read (current_top_target (), TARGET_OBJECT_OPENVMS_UIB,
                      annex + 2, buf, 0, sizeof (buf));
 
   if (res != sizeof (buf))
@@ -76,7 +75,7 @@ ia64_vms_find_proc_info_x (unw_addr_space_t as, unw_word_t ip,
   pi->unwind_info = xmalloc (pi->unwind_info_size);
 
   res = target_read_memory (table_addr + 8,
-                            pi->unwind_info, pi->unwind_info_size);
+                            (gdb_byte *) pi->unwind_info, pi->unwind_info_size);
   if (res != 0)
     {
       xfree (pi->unwind_info);
@@ -123,8 +122,8 @@ ia64_vms_get_dyn_info_list (unw_addr_space_t as,
 static unw_accessors_t ia64_vms_unw_accessors;
 static unw_accessors_t ia64_vms_unw_rse_accessors;
 
-/* Set of ia64 gdb libunwind-frame callbacks and data for generic
-   libunwind-frame code to use.  */
+/* Set of ia64-libunwind-tdep gdb callbacks and data for generic
+   ia64-libunwind-tdep code to use.  */
 static struct libunwind_descr ia64_vms_libunwind_descr;
 
 #endif /* HAVE_LIBUNWIND_IA64_H */
@@ -154,11 +153,9 @@ ia64_openvms_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 #endif
 }
 
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-extern initialize_file_ftype _initialize_ia64_hpux_tdep;
-
+void _initialize_ia64_vms_tdep ();
 void
-_initialize_ia64_hpux_tdep (void)
+_initialize_ia64_vms_tdep ()
 {
   gdbarch_register_osabi (bfd_arch_ia64, 0, GDB_OSABI_OPENVMS,
                          ia64_openvms_init_abi);
This page took 0.025868 seconds and 4 git commands to generate.