2003-09-14 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / standalone.c
index 1aa76d54f16623eb7f6dd89f0948532dbb830515..cddd5b9f7d28c24d6ddbbe3cecfe0799ffdb4a68 100644 (file)
@@ -1,5 +1,6 @@
 /* Interface to bare machine for GDB running as kernel debugger.
-   Copyright (C) 1986, 1989, 1991 Free Software Foundation, Inc.
+   Copyright 1986, 1989, 1991, 1992, 1993, 1995, 1996, 2000, 2001
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -30,7 +31,7 @@
 #endif /* SIGTSTP and SIGIO defined (must be 4.2) */
 
 #include "defs.h"
-#include "signals.h"
+#include <signal.h>
 #include "symtab.h"
 #include "frame.h"
 #include "inferior.h"
@@ -129,7 +130,7 @@ int sourcedesc;
 
 open (char *filename, int modes)
 {
-  register char *next;
+  char *next;
 
   if (modes)
     {
@@ -145,7 +146,7 @@ open (char *filename, int modes)
 
   for (next = files_start; *(int *) next; next += *(int *) next)
     {
-      if (!STRCMP (next + 4, filename))
+      if (!strcmp (next + 4, filename))
        {
          sourcebeg = next + 4 + strlen (next + 4) + 1;
          sourcebeg = (char *) (((int) sourcebeg + 3) & (-4));
@@ -212,8 +213,8 @@ myread (int desc, char *destptr, int size, char *filename)
 int
 fread (int bufp, int numelts, int eltsize, int stream)
 {
-  register int elts = min (numelts, sourceleft / eltsize);
-  register int len = elts * eltsize;
+  int elts = min (numelts, sourceleft / eltsize);
+  int len = elts * eltsize;
 
   if (stream != sourcedesc)
     {
@@ -283,7 +284,7 @@ fprintf (int ign, int a1, int a2, int a3, int a4, int a5, int a6, int a7,
 
 fwrite (register char *buf, int numelts, int size, int stream)
 {
-  register int i = numelts * size;
+  int i = numelts * size;
   while (i-- > 0)
     fputc (*buf++, stream);
 }
@@ -335,7 +336,7 @@ have_core_file_p (void)
 
 kill_command (void)
 {
-  inferior_pid = 0;
+  inferior_ptid = null_ptid;
 }
 
 terminal_inferior (void)
@@ -530,7 +531,7 @@ int
 wait (WAITTYPE *w)
 {
   WSETSTOP (*w, fault_table[fault_code / FAULT_CODE_UNITS]);
-  return inferior_pid;
+  return PIDGET (inferior_ptid);
 }
 \f
 /* Allocate a big space in which files for kdb to read will be stored.
@@ -559,7 +560,7 @@ int kdb_stack_end;
 
 _initialize_standalone (void)
 {
-  register char *next;
+  char *next;
 
   /* Find start of data on files.  */
 
This page took 0.027773 seconds and 4 git commands to generate.