2004-02-14 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / mips-tdep.c
index 3a80c06d5b0f2c8ee7840452d33f48523fa3ffaf..fb80964e6ed81d75c9bcd41c6c63451f3201b68c 100644 (file)
@@ -5791,8 +5791,6 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_register_to_value (gdbarch, mips_register_to_value);
   set_gdbarch_value_to_register (gdbarch, mips_value_to_register);
 
-  set_gdbarch_frame_args_skip (gdbarch, 0);
-
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
   set_gdbarch_breakpoint_from_pc (gdbarch, mips_breakpoint_from_pc);
 
@@ -5817,13 +5815,22 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
      is sitting on?  */
   set_gdbarch_have_nonsteppable_watchpoint (gdbarch, 1);
 
-  /* Hook in OS ABI-specific overrides, if they have been registered.  */
-  gdbarch_init_osabi (info, gdbarch);
-
   set_gdbarch_skip_trampoline_code (gdbarch, mips_skip_stub);
 
-  set_gdbarch_in_solib_call_trampoline (gdbarch, mips_in_call_stub);
-  set_gdbarch_in_solib_return_trampoline (gdbarch, mips_in_return_stub);
+  /* NOTE drow/2004-02-11: We overload the core solib trampoline code
+     to support MIPS16.  This is a bad thing.  Make sure not to do it
+     if we have an OS ABI that actually supports shared libraries, since
+     shared library support is more important.  If we have an OS someday
+     that supports both shared libraries and MIPS16, we'll have to find
+     a better place for these.  */
+  if (info.osabi == GDB_OSABI_UNKNOWN)
+    {
+      set_gdbarch_in_solib_call_trampoline (gdbarch, mips_in_call_stub);
+      set_gdbarch_in_solib_return_trampoline (gdbarch, mips_in_return_stub);
+    }
+
+  /* Hook in OS ABI-specific overrides, if they have been registered.  */
+  gdbarch_init_osabi (info, gdbarch);
 
   return gdbarch;
 }
This page took 0.025228 seconds and 4 git commands to generate.