* gdbint.texinfo (Host Definition): Remove description of
[deliverable/binutils-gdb.git] / gdb / i960-tdep.c
index 7bc0e882ebf086e0a8b8dc93de6804e74fcbf474..197ac103eafad871bf93cc027a67b1d45d81efd8 100644 (file)
@@ -1,5 +1,6 @@
 /* Target-machine dependent code for the Intel 960
-   Copyright 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+   Free Software Foundation, Inc.
    Contributed by Intel Corporation.
    examine_prologue and other parts contributed by Wind River Systems.
 
@@ -28,6 +29,7 @@
 #include "target.h"
 #include "gdbcore.h"
 #include "inferior.h"
+#include "regcache.h"
 
 static CORE_ADDR next_insn (CORE_ADDR memaddr,
                            unsigned int *pword1, unsigned int *pword2);
@@ -331,8 +333,7 @@ examine_prologue (register CORE_ADDR ip, register CORE_ADDR limit,
    prologue.  */
 
 CORE_ADDR
-i960_skip_prologue (ip)
-CORE_ADDR (ip);
+i960_skip_prologue (CORE_ADDR ip)
 {
   struct frame_saved_regs saved_regs_dummy;
   struct symtab_and_line sal;
@@ -479,9 +480,11 @@ frame_struct_result_address (struct frame_info *fi)
 }
 
 /* Return address to which the currently executing leafproc will return,
-   or 0 if ip is not in a leafproc (or if we can't tell if it is).
+   or 0 if IP, the value of the instruction pointer from the currently
+   executing function, is not in a leafproc (or if we can't tell if it
+   is).
 
-   Do this by finding the starting address of the routine in which ip lies.
+   Do this by finding the starting address of the routine in which IP lies.
    If the instruction there is "mov g14, gx" (where x is in [0,7]), this
    is a leafproc and the return address is in register gx.  Well, this is
    true unless the return address points at a RET instruction in the current
@@ -489,8 +492,7 @@ frame_struct_result_address (struct frame_info *fi)
    has been entered through the CALL entry point.  */
 
 CORE_ADDR
-leafproc_return (ip)
-     CORE_ADDR ip;             /* ip from currently executing function */
+leafproc_return (CORE_ADDR ip)
 {
   register struct minimal_symbol *msymbol;
   char *p;
@@ -684,12 +686,13 @@ struct tabent
   char numops;
 };
 
-static int                     /* returns instruction length: 4 or 8 */
-mem (memaddr, word1, word2, noprint)
-     unsigned long memaddr;
-     unsigned long word1, word2;
-     int noprint;              /* If TRUE, return instruction length, but
-                                  don't output any text.  */
+/* Return instruction length, either 4 or 8.  When NOPRINT is non-zero
+   (TRUE), don't output any text.  (Actually, as implemented, if NOPRINT
+   is 0, abort() is called.) */
+
+static int
+mem (unsigned long memaddr, unsigned long word1, unsigned long word2,
+     int noprint)
 {
   int i, j;
   int len;
@@ -773,7 +776,7 @@ mem (memaddr, word1, word2, noprint)
     {
       return len;
     }
-  abort ();
+  internal_error (__FILE__, __LINE__, "failed internal consistency check");
 }
 
 /* Read the i960 instruction at 'memaddr' and return the address of 
This page took 0.023545 seconds and 4 git commands to generate.