* gdb.texinfo (Continuing and Stepping): When talking about "step"
[deliverable/binutils-gdb.git] / gdb / delta68-nat.c
index ed31e58186b04cdf5ad5389bac5c0c8a9eb6281d..80fc5fb44d47813ed955974ed7be67fc41b0221e 100644 (file)
@@ -1,3 +1,22 @@
+/* Functions specific to running gdb native on a Motorola Delta Series sysV68.
+   Copyright (C) 1993, Free Software Foundation, Inc.
+
+This file is part of GDB.
+
+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 2 of the License, or
+(at your option) any later version.
+
+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 this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+
 #include "defs.h"
 #include <sys/signal.h>        /* for MAXSIG in sys/user.h */
 #include <sys/types.h> /* for ushort in sys/dir.h */
@@ -24,7 +43,7 @@ register_addr (regno, blockend)
   if (regno >= 0 && regno < sizeof(sysv68reg) / sizeof(sysv68reg[0]))
     return blockend + sysv68reg[regno] * 4; 
   else if (regno < FPC_REGNUM)
-    return offsetof (struct user, u_fpu.regs.reg[regno - FP0_REGNUM]
+    return offsetof (struct user, u_fpu.regs.reg[regno - FP0_REGNUM][0]);
   else if (regno == FPC_REGNUM)
     return offsetof (struct user, u_fpu.regs.control);
   else if (regno == FPS_REGNUM)
@@ -33,7 +52,7 @@ register_addr (regno, blockend)
     return offsetof (struct user, u_fpu.regs.iaddr);
   else
     {
-      fprintf (stderr, "\
+      fprintf_unfiltered (gdb_stderr, "\
 Internal error: invalid register number %d in REGISTER_U_ADDR\n",
               regno);
       return blockend;
@@ -41,12 +60,16 @@ Internal error: invalid register number %d in REGISTER_U_ADDR\n",
 }
 
 CORE_ADDR kernel_u_addr;
-static struct nlist nl[] = {{ "_u", -1, }, { (char *) 0, }};
 
 /* Read the value of the u area from the kernel.  */
-void _initialize_kernel_u_addr ()
+void
+_initialize_delta68_nat ()
 {
-  if (nlist ("/sysV68", nl) == 0)
+  struct nlist nl[2];
+
+  nl[0].n_name = "u";
+  nl[1].n_name = NULL;
+  if (nlist ("/sysV68", nl) == 0 && nl[0].n_scnum != 0)
     kernel_u_addr = nl[0].n_value;
   else
     {
This page took 0.02398 seconds and 4 git commands to generate.