ubsan: nios2: left shift cannot be represented in type 'int'
[deliverable/binutils-gdb.git] / gdb / ia64-linux-tdep.c
index 3bdf2a106c5c3e19e91a7b72b34acf3b1cf61754..f1954911a714527cd31416f65a662550c31c3534 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for the IA-64 for GDB, the GNU debugger.
 
-   Copyright (C) 2000-2014 Free Software Foundation, Inc.
+   Copyright (C) 2000-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -184,9 +184,9 @@ ia64_linux_supply_fpregset (const struct regset *regset,
      did the same.  So ignore whatever might be recorded in fpregset_t
      for fr0/fr1 and always supply their expected values.  */
   if (regnum == -1 || regnum == IA64_FR0_REGNUM)
-    regcache_raw_supply (regcache, IA64_FR0_REGNUM, f_zero);
+    regcache->raw_supply (IA64_FR0_REGNUM, f_zero);
   if (regnum == -1 || regnum == IA64_FR1_REGNUM)
-    regcache_raw_supply (regcache, IA64_FR1_REGNUM, f_one);
+    regcache->raw_supply (IA64_FR1_REGNUM, f_one);
 }
 
 static const struct regset ia64_linux_gregset =
@@ -201,20 +201,16 @@ static const struct regset ia64_linux_fpregset =
     ia64_linux_supply_fpregset, regcache_collect_regset
   };
 
-static const struct regset *
-ia64_linux_regset_from_core_section (struct gdbarch *gdbarch,
-                                    const char *sect_name,
-                                    size_t sect_size)
+static void
+ia64_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
+                                        iterate_over_regset_sections_cb *cb,
+                                        void *cb_data,
+                                        const struct regcache *regcache)
 {
-  if (strcmp (sect_name, ".reg") == 0
-      && sect_size >= IA64_LINUX_GREGS_SIZE)
-    return &ia64_linux_gregset;
-
-  if (strcmp (sect_name, ".reg2") == 0
-      && sect_size >= IA64_LINUX_FPREGS_SIZE)
-    return &ia64_linux_fpregset;
-
-  return NULL;
+  cb (".reg", IA64_LINUX_GREGS_SIZE, IA64_LINUX_GREGS_SIZE, &ia64_linux_gregset,
+      NULL, cb_data);
+  cb (".reg2", IA64_LINUX_FPREGS_SIZE, IA64_LINUX_FPREGS_SIZE,
+      &ia64_linux_fpregset, NULL, cb_data);
 }
 
 static void
@@ -248,8 +244,8 @@ ia64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
                                              svr4_fetch_objfile_link_map);
 
   /* Core file support. */
-  set_gdbarch_regset_from_core_section (gdbarch,
-                                       ia64_linux_regset_from_core_section);
+  set_gdbarch_iterate_over_regset_sections
+    (gdbarch, ia64_linux_iterate_over_regset_sections);
 
   /* SystemTap related.  */
   set_gdbarch_stap_register_prefixes (gdbarch, stap_register_prefixes);
@@ -262,9 +258,6 @@ ia64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
                                      ia64_linux_stap_is_single_operand);
 }
 
-/* Provide a prototype to silence -Wmissing-prototypes.  */
-extern initialize_file_ftype _initialize_ia64_linux_tdep;
-
 void
 _initialize_ia64_linux_tdep (void)
 {
This page took 0.038767 seconds and 4 git commands to generate.