gdb: remove current_top_target function
[deliverable/binutils-gdb.git] / gdb / ia64-vms-tdep.c
index 07419e86a2fe27d99a01ad6c86ecf970a088caea..cc8e191427485a93fb4fdc579f4e733fd8b3e922 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for OpenVMS IA-64.
 
-   Copyright (C) 2012-2018 Free Software Foundation, Inc.
+   Copyright (C) 2012-2021 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
 
@@ -30,8 +31,8 @@
 
 static int
 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)
+                          unw_proc_info_t *pi,
+                          int need_unwind_info, void *arg)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
   gdb_byte buf[32];
@@ -40,8 +41,9 @@ ia64_vms_find_proc_info_x (unw_addr_space_t as, unw_word_t ip,
   CORE_ADDR table_addr;
   unsigned int info_len;
 
-  res = target_read (current_top_target (), TARGET_OBJECT_OPENVMS_UIB,
-                     annex + 2, buf, 0, sizeof (buf));
+  res = target_read (current_inferior ()->top_target (),
+                    TARGET_OBJECT_OPENVMS_UIB,
+                    annex + 2, buf, 0, sizeof (buf));
 
   if (res != sizeof (buf))
     return -UNW_ENOINFO;
@@ -74,7 +76,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,
-                            (gdb_byte *) pi->unwind_info, pi->unwind_info_size);
+                           (gdb_byte *) pi->unwind_info, pi->unwind_info_size);
   if (res != 0)
     {
       xfree (pi->unwind_info);
@@ -102,7 +104,7 @@ ia64_vms_find_proc_info_x (unw_addr_space_t as, unw_word_t ip,
 
 static void
 ia64_vms_put_unwind_info (unw_addr_space_t as,
-                          unw_proc_info_t *pip, void *arg)
+                         unw_proc_info_t *pip, void *arg)
 {
   /* Nothing required for now.  */
 }
@@ -112,7 +114,7 @@ ia64_vms_put_unwind_info (unw_addr_space_t as,
 
 static int
 ia64_vms_get_dyn_info_list (unw_addr_space_t as,
-                            unw_word_t *dilap, void *arg)
+                           unw_word_t *dilap, void *arg)
 {
   return -UNW_ENOINFO;
 }
@@ -152,8 +154,9 @@ ia64_openvms_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 #endif
 }
 
+void _initialize_ia64_vms_tdep ();
 void
-_initialize_ia64_vms_tdep (void)
+_initialize_ia64_vms_tdep ()
 {
   gdbarch_register_osabi (bfd_arch_ia64, 0, GDB_OSABI_OPENVMS,
                          ia64_openvms_init_abi);
This page took 0.026242 seconds and 4 git commands to generate.