Lint fixes from Paul Eggert (eggert@twinsun.com):
[deliverable/binutils-gdb.git] / gdb / convex-xdep.c
index f9f44a0eab27f66591a147af74df222964431064..08ce2654a3fb3ebb00e37db07b21cce8babb1245 100644 (file)
@@ -1,25 +1,23 @@
-/* Convex stuff for GDB.
-   Copyright (C) 1990-1991 Free Software Foundation, Inc.
+/* Convex host-dependent code for GDB.
+   Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
 
 This file is part of GDB.
 
-GDB is free software; you can redistribute it and/or modify
+This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
-any later version.
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
 
-GDB is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
-along with GDB; see the file COPYING.  If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
+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 "param.h"
 #include "command.h"
 #include "symtab.h"
 #include "value.h"
@@ -191,13 +189,6 @@ static int exec_trap_timer;
 
 #include "gdbcmd.h"
 
-/* Nonzero if we are debugging an attached outside process
-   rather than an inferior.  */
-
-extern int attach_flag;
-
-
-
 static struct type *vector_type ();
 static long *read_vector_register ();
 static long *read_vector_register_1 ();
@@ -214,14 +205,15 @@ static void psw_info ();
 static sig_noop ();
 static ptr_cmp ();
 
-extern char *sys_siglist[];
 \f
 /* Execute ptrace.  Convex V7 replaced ptrace with pattach.
    Allow ptrace (0) as a no-op.  */
 
 int
 call_ptrace (request, pid, procaddr, buf)
-     int request, pid, procaddr, buf;
+     int request, pid;
+     PTRACE_ARG3_TYPE procaddr;
+     int buf;
 {
   if (request == 0)
     return;
@@ -259,6 +251,7 @@ fetch_inferior_registers (regno)
 /* Store our register values back into the inferior.
    For Convex, do this only once, right before resuming inferior.  */
 
+void
 store_inferior_registers (regno)
      int regno;
 {
@@ -383,16 +376,6 @@ kill_inferior ()
   target_mourn_inferior ();
 }
 
-/* This is used when GDB is exiting.  It gives less chance of error.*/
-
-kill_inferior_fast ()
-{
-  if (inferior_pid == 0)
-    return;
-  ioctl (inferior_fd, PIXTERMINATE, 0);
-  wait (0);
-}
-
 /* Read vector register REG, and return a pointer to the value.  */
 
 static long *
@@ -913,7 +896,7 @@ core_file_command (filename, from_tty)
       if (filename[0] == '/')
        corefile = savestring (filename, strlen (filename));
       else
-       corefile = concat (current_directory, "/", filename);
+       corefile = concat (current_directory, "/", filename, NULL);
 
       printf_filtered ("Program %s ", u.u_comm);
 
@@ -951,9 +934,7 @@ core_file_command (filename, from_tty)
 
          printf_filtered ("thread %d received signal %d, %s\n",
                           n, thread_signal[n],
-                          thread_signal[n] < NSIG
-                          ? sys_siglist[thread_signal[n]]
-                          : "(undocumented)");
+                          safe_strsignal (thread_signal[n]));
        }
 
       /* Select an interesting thread -- also-rans died with SIGKILL,
@@ -976,7 +957,7 @@ core_file_command (filename, from_tty)
       select_frame (get_current_frame (), 0);
       validate_files ();
 
-      print_sel_frame (1);
+      print_stack_frame (selected_frame, selected_frame_level, -1);
     }
   else if (from_tty)
     printf_filtered ("No core file now.\n");
This page took 0.024388 seconds and 4 git commands to generate.