fix repeated ext_format_i960 local decls so sun4 cc accepts it
[deliverable/binutils-gdb.git] / gdb / i386-xdep.c
index f3c72d11b8a8cd5e23b2f9f2a1d610ffe3852d1c..67e904b83421fa6febfb91b9fed34ba5f79e1b4b 100644 (file)
@@ -17,7 +17,6 @@ You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
-#include <stdio.h>
 #include "defs.h"
 #include "frame.h"
 #include "inferior.h"
@@ -43,12 +42,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include "target.h"
 
-extern void print_387_control_word ();         /* i387-tdep.h */
-extern void print_387_status_word ();
-
 extern struct ext_format ext_format_i387;
 \f
-/* this table must line up with REGISTER_NAMES in m-i386.h */
+/* this table must line up with REGISTER_NAMES in tm-i386v.h */
 /* symbols like 'EAX' come from <sys/reg.h> */
 static int regmap[] = 
 {
@@ -61,7 +57,11 @@ static int regmap[] =
 /* blockend is the value of u.u_ar0, and points to the
  * place where GS is stored
  */
+
+int
 i386_register_u_addr (blockend, regnum)
+     int blockend;
+     int regnum;
 {
 #if 0
   /* this will be needed if fp registers are reinstated */
@@ -160,13 +160,13 @@ print_387_status (status, ep)
       printf ("  %g\n", val);
     }
   if (ep->r0)
-    printf ("warning: reserved0 is %s\n", local_hex_string(ep->r0));
+    warning ("reserved0 is %s\n", local_hex_string(ep->r0));
   if (ep->r1)
-    printf ("warning: reserved1 is %s\n", local_hex_string(ep->r1));
+    warning ("reserved1 is %s\n", local_hex_string(ep->r1));
   if (ep->r2)
-    printf ("warning: reserved2 is %s\n", local_hex_string(ep->r2));
+    warning ("reserved2 is %s\n", local_hex_string(ep->r2));
   if (ep->r3)
-    printf ("warning: reserved3 is %s\n", local_hex_string(ep->r3));
+    warning ("reserved3 is %s\n", local_hex_string(ep->r3));
 }
 
 #ifndef U_FPSTATE
@@ -194,7 +194,7 @@ i386_float_info ()
       unsigned int mask;
       
       rounded_addr = uaddr & -sizeof (int);
-      data = ptrace (3, inferior_pid, rounded_addr, 0);
+      data = ptrace (3, inferior_pid, (PTRACE_ARG3_TYPE) rounded_addr, 0);
       mask = 0xff << ((uaddr - rounded_addr) * 8);
       
       fpvalid = ((data & mask) != 0);
@@ -229,7 +229,7 @@ i386_float_info ()
       ip = (int *)buf;
       for (i = 0; i < rounded_size; i++) 
        {
-         *ip++ = ptrace (3, inferior_pid, rounded_addr, 0);
+         *ip++ = ptrace (3, inferior_pid, (PTRACE_ARG3_TYPE) rounded_addr, 0);
          rounded_addr += sizeof (int);
        }
     } 
This page took 0.024689 seconds and 4 git commands to generate.