[gdb/testsuite] Fix scrolling in gdb.dwarf2/multidictionary.exp
[deliverable/binutils-gdb.git] / gdb / hppa-linux-tdep.c
index 6dc2e84c0f28f8d64934063f11a1a641623c8379..6a38d7200bec2b55388fc1a15b2f34d471f55f09 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for GNU/Linux running on PA-RISC, for GDB.
 
-   Copyright (C) 2004-2015 Free Software Foundation, Inc.
+   Copyright (C) 2004-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -26,7 +26,7 @@
 #include "glibc-tdep.h"
 #include "frame-unwind.h"
 #include "trad-frame.h"
-#include "dwarf2-frame.h"
+#include "dwarf2/frame.h"
 #include "value.h"
 #include "regset.h"
 #include "regcache.h"
@@ -39,14 +39,13 @@ static int
 hppa_dwarf_reg_to_regnum (struct gdbarch *gdbarch, int reg)
 {
   /* The general registers and the sar are the same in both sets.  */
-  if (reg <= 32)
+  if (reg >= 0 && reg <= 32)
     return reg;
 
   /* fr4-fr31 (left and right halves) are mapped from 72.  */
   if (reg >= 72 && reg <= 72 + 28 * 2)
     return HPPA_FP4_REGNUM + (reg - 72);
 
-  warning (_("Unmapped DWARF DBX Register #%d encountered."), reg);
   return -1;
 }
 
@@ -205,7 +204,7 @@ hppa_linux_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
   int i;
 
   if (*this_cache)
-    return *this_cache;
+    return (struct hppa_linux_sigtramp_unwind_cache *) *this_cache;
 
   info = FRAME_OBSTACK_ZALLOC (struct hppa_linux_sigtramp_unwind_cache);
   *this_cache = info;
@@ -480,14 +479,10 @@ hppa_linux_iterate_over_regset_sections (struct gdbarch *gdbarch,
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
-  cb (".reg", 80 * tdep->bytes_per_address, &hppa_linux_regset,
-      NULL, cb_data);
-  cb (".reg2", 64 * 4, &hppa_linux_fpregset, NULL, cb_data);
+  cb (".reg", 80 * tdep->bytes_per_address, 80 * tdep->bytes_per_address,
+      &hppa_linux_regset, NULL, cb_data);
+  cb (".reg2", 64 * 4, 64 * 4, &hppa_linux_fpregset, NULL, cb_data);
 }
-\f
-
-/* Forward declarations.  */
-extern initialize_file_ftype _initialize_hppa_linux_tdep;
 
 static void
 hppa_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
@@ -519,6 +514,7 @@ hppa_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
      some discussions to support 128-bit long double, but it requires some
      more work in gcc and glibc first.  */
   set_gdbarch_long_double_bit (gdbarch, 64);
+  set_gdbarch_long_double_format (gdbarch, floatformats_ieee_double);
 
   set_gdbarch_iterate_over_regset_sections
     (gdbarch, hppa_linux_iterate_over_regset_sections);
@@ -530,8 +526,9 @@ hppa_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
                                              svr4_fetch_objfile_link_map);
 }
 
+void _initialize_hppa_linux_tdep ();
 void
-_initialize_hppa_linux_tdep (void)
+_initialize_hppa_linux_tdep ()
 {
   gdbarch_register_osabi (bfd_arch_hppa, 0, GDB_OSABI_LINUX,
                          hppa_linux_init_abi);
This page took 0.02485 seconds and 4 git commands to generate.