* As suggested by crash, made --with-sim-gpu2 option active only on -sky- target.
[deliverable/binutils-gdb.git] / gdb / delta68-nat.c
index e032a7d91ba79a363eaca779d1e16612fe265380..2874edd2776dc974de2e01c9724703ed64a1c43a 100644 (file)
@@ -15,7 +15,7 @@ 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.  */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
 #include <sys/signal.h>        /* for MAXSIG in sys/user.h */
@@ -32,10 +32,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 /* Return the address in the core dump or inferior of register REGNO.
    BLOCKEND is the address of the end of the user structure.  */
 
-unsigned int
+CORE_ADDR
 register_addr (regno, blockend)
      int       regno;
-     int       blockend;
+     CORE_ADDR blockend;
 {
   static int   sysv68reg[] =
     { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, -1, 15, 16 };
@@ -43,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)
@@ -52,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;
@@ -60,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
     {
@@ -73,3 +77,10 @@ void _initialize_kernel_u_addr ()
       exit (1);
     }
 }
+
+clear_insn_cache ()
+{
+#ifdef MCT_TEXT /* in sys/signal.h on sysV68 R3V7.1 */
+  memctl(0, 4096, MCT_TEXT);
+#endif
+}
This page took 0.024724 seconds and 4 git commands to generate.