gdbtypes.resolve_dynamic_range: Add function description.
[deliverable/binutils-gdb.git] / gdb / mips-linux-tdep.c
index 0c41444ed9c9b618dc029d5f3014f1b08463c1c0..a975db6957c8c7e67dfca8729b1299ab3e6ab10f 100644 (file)
@@ -32,7 +32,6 @@
 #include "gdbtypes.h"
 #include "objfiles.h"
 #include "solib.h"
-#include "solib-svr4.h"
 #include "solist.h"
 #include "symtab.h"
 #include "target-descriptions.h"
@@ -619,11 +618,30 @@ mips64_fill_fpregset_wrapper (const struct regset *regset,
   mips64_fill_fpregset (regcache, (mips64_elf_fpregset_t *)gregs, regnum);
 }
 
+static const struct regset mips_linux_gregset =
+  {
+    NULL, mips_supply_gregset_wrapper, mips_fill_gregset_wrapper
+  };
+
+static const struct regset mips64_linux_gregset =
+  {
+    NULL, mips64_supply_gregset_wrapper, mips64_fill_gregset_wrapper
+  };
+
+static const struct regset mips_linux_fpregset =
+  {
+    NULL, mips_supply_fpregset_wrapper, mips_fill_fpregset_wrapper
+  };
+
+static const struct regset mips64_linux_fpregset =
+  {
+    NULL, mips64_supply_fpregset_wrapper, mips64_fill_fpregset_wrapper
+  };
+
 static const struct regset *
 mips_linux_regset_from_core_section (struct gdbarch *gdbarch,
                                     const char *sect_name, size_t sect_size)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   mips_elf_gregset_t gregset;
   mips_elf_fpregset_t fpregset;
   mips64_elf_gregset_t gregset64;
@@ -632,21 +650,9 @@ mips_linux_regset_from_core_section (struct gdbarch *gdbarch,
   if (strcmp (sect_name, ".reg") == 0)
     {
       if (sect_size == sizeof (gregset))
-       {
-         if (tdep->gregset == NULL)
-           tdep->gregset = regset_alloc (gdbarch,
-                                         mips_supply_gregset_wrapper,
-                                         mips_fill_gregset_wrapper);
-         return tdep->gregset;
-       }
+       return &mips_linux_gregset;
       else if (sect_size == sizeof (gregset64))
-       {
-         if (tdep->gregset64 == NULL)
-           tdep->gregset64 = regset_alloc (gdbarch,
-                                           mips64_supply_gregset_wrapper,
-                                           mips64_fill_gregset_wrapper);
-         return tdep->gregset64;
-       }
+       return &mips64_linux_gregset;
       else
        {
          warning (_("wrong size gregset struct in core file"));
@@ -655,21 +661,9 @@ mips_linux_regset_from_core_section (struct gdbarch *gdbarch,
   else if (strcmp (sect_name, ".reg2") == 0)
     {
       if (sect_size == sizeof (fpregset))
-       {
-         if (tdep->fpregset == NULL)
-           tdep->fpregset = regset_alloc (gdbarch,
-                                          mips_supply_fpregset_wrapper,
-                                          mips_fill_fpregset_wrapper);
-         return tdep->fpregset;
-       }
+       return &mips_linux_fpregset;
       else if (sect_size == sizeof (fpregset64))
-       {
-         if (tdep->fpregset64 == NULL)
-           tdep->fpregset64 = regset_alloc (gdbarch,
-                                            mips64_supply_fpregset_wrapper,
-                                            mips64_fill_fpregset_wrapper);
-         return tdep->fpregset64;
-       }
+       return &mips64_linux_fpregset;
       else
        {
          warning (_("wrong size fpregset struct in core file"));
@@ -823,11 +817,11 @@ mips_linux_in_dynsym_resolve_code (CORE_ADDR pc)
 static CORE_ADDR
 mips_linux_skip_resolver (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
-  struct minimal_symbol *resolver;
+  struct bound_minimal_symbol resolver;
 
   resolver = lookup_minimal_symbol ("__dl_runtime_resolve", NULL, NULL);
 
-  if (resolver && SYMBOL_VALUE_ADDRESS (resolver) == pc)
+  if (resolver.minsym && BMSYMBOL_VALUE_ADDRESS (resolver) == pc)
     return frame_unwind_caller_pc (get_current_frame ());
 
   return glibc_skip_solib_resolver (gdbarch, pc);
This page took 0.094906 seconds and 4 git commands to generate.