* inftarg.c (child_thread_alive): New function to see if a
[deliverable/binutils-gdb.git] / gdb / mips-tdep.c
index 7e623c3103703595a73f7f7b02696ff0227f191d..d708b6acabc7ec643592d6e09f46a7b4327e25ea 100644 (file)
@@ -1,5 +1,5 @@
 /* Target-dependent code for the MIPS architecture, for GDB, the GNU Debugger.
-   Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994
+   Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995
    Free Software Foundation, Inc.
    Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU
    and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin.
@@ -45,6 +45,10 @@ static int mips_in_lenient_prologue PARAMS ((CORE_ADDR, CORE_ADDR));
 
 void mips_set_processor_type_command PARAMS ((char *, int));
 
+int mips_set_processor_type PARAMS ((char *));
+
+static void mips_show_processor_type_command PARAMS ((char *, int));
+
 static void reinit_frame_cache_sfunc PARAMS ((char *, int,
                                              struct cmd_list_element *));
 
@@ -1091,8 +1095,12 @@ mips_skip_prologue (pc, lenient)
        else if ((inst & 0xF3E00000) == 0xA3C00000 && (inst & 0x001F0000))
                                                /* sx reg,n($s8) */
            continue;                           /* reg != $zero */
-       else if (inst == 0x03A0F021)            /* move $s8,$sp */
+        /* move $s8,$sp.  With different versions of gas this will be either
+           `addu $s8,$sp,$zero' or `or $s8,$sp,$zero'.  Accept either.  */
+        else if (inst == 0x03A0F021 || inst == 0x03a0f025)
            continue;
+
        else if ((inst & 0xFF9F07FF) == 0x00800021) /* move reg,$a0-$a3 */
            continue;
        else if ((inst & 0xffff0000) == 0x3c1c0000) /* lui $gp,n */
@@ -1255,7 +1263,7 @@ mips_set_processor_type (str)
   int i, j;
 
   if (str == NULL)
-    return;
+    return 0;
 
   for (i = 0; mips_processor_type_table[i].name != NULL; ++i)
     {
@@ -1303,11 +1311,24 @@ reinit_frame_cache_sfunc (args, from_tty, c)
   reinit_frame_cache ();
 }
 
+int
+gdb_print_insn_mips (memaddr, info)
+     bfd_vma memaddr;
+     disassemble_info *info;
+{
+  if (TARGET_BYTE_ORDER == BIG_ENDIAN)
+    return print_insn_big_mips (memaddr, info);
+  else
+    return print_insn_little_mips (memaddr, info);
+}
+
 void
 _initialize_mips_tdep ()
 {
   struct cmd_list_element *c;
 
+  tm_print_insn = gdb_print_insn_mips;
+
   /* Let the user turn off floating point and set the fence post for
      heuristic_proc_start.  */
 
This page took 0.02361 seconds and 4 git commands to generate.