Obvious fix: in an entry for 1997-09-10, expand wildcard to explicit
[deliverable/binutils-gdb.git] / gdb / lynx-nat.c
index dba5559112c6f97898e9ed660b9b64287fd12dd0..3e376c32424a801d5bfe72e85cf6cebf5048ef57 100644 (file)
@@ -1,5 +1,5 @@
 /* Native-dependent code for LynxOS.
-   Copyright 1993, 1994 Free Software Foundation, Inc.
+   Copyright 1993, 1994, 2001 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #include "inferior.h"
 #include "target.h"
 #include "gdbcore.h"
+#include "regcache.h"
 
 #include <sys/ptrace.h>
 #include <sys/wait.h>
 #include <sys/fpp.h>
 
-static unsigned long registers_addr PARAMS ((int pid));
-static void fetch_core_registers PARAMS ((char *, unsigned, int, CORE_ADDR));
+static unsigned long registers_addr (int pid);
+static void fetch_core_registers (char *, unsigned, int, CORE_ADDR);
 
 #define X(ENTRY)(offsetof(struct econtext, ENTRY))
 
@@ -260,8 +261,7 @@ static int regmap[] =
    It also handles knows where to find the I & L regs on the stack.  */
 
 void
-fetch_inferior_registers (regno)
-     int regno;
+fetch_inferior_registers (int regno)
 {
   int whatregs = 0;
 
@@ -319,15 +319,15 @@ fetch_inferior_registers (regno)
 
       sp = read_register (SP_REGNUM);
 
-      target_xfer_memory (sp + FRAME_SAVED_I0,
+      target_read_memory (sp + FRAME_SAVED_I0,
                          &registers[REGISTER_BYTE (I0_REGNUM)],
-                         8 * REGISTER_RAW_SIZE (I0_REGNUM), 0);
+                         8 * REGISTER_RAW_SIZE (I0_REGNUM));
       for (i = I0_REGNUM; i <= I7_REGNUM; i++)
        register_valid[i] = 1;
 
-      target_xfer_memory (sp + FRAME_SAVED_L0,
+      target_read_memory (sp + FRAME_SAVED_L0,
                          &registers[REGISTER_BYTE (L0_REGNUM)],
-                         8 * REGISTER_RAW_SIZE (L0_REGNUM), 0);
+                         8 * REGISTER_RAW_SIZE (L0_REGNUM));
       for (i = L0_REGNUM; i <= L0_REGNUM + 7; i++)
        register_valid[i] = 1;
     }
@@ -361,8 +361,7 @@ fetch_inferior_registers (regno)
    this point.  */
 
 void
-store_inferior_registers (regno)
-     int regno;
+store_inferior_registers (int regno)
 {
   int whatregs = 0;
 
@@ -412,27 +411,28 @@ store_inferior_registers (regno)
       if (regno == -1 || regno == SP_REGNUM)
        {
          if (!register_valid[L0_REGNUM + 5])
-           abort ();
-         target_xfer_memory (sp + FRAME_SAVED_I0,
+           internal_error (__FILE__, __LINE__, "failed internal consistency check");
+         target_write_memory (sp + FRAME_SAVED_I0,
                              &registers[REGISTER_BYTE (I0_REGNUM)],
-                             8 * REGISTER_RAW_SIZE (I0_REGNUM), 1);
+                             8 * REGISTER_RAW_SIZE (I0_REGNUM));
 
-         target_xfer_memory (sp + FRAME_SAVED_L0,
+         target_write_memory (sp + FRAME_SAVED_L0,
                              &registers[REGISTER_BYTE (L0_REGNUM)],
-                             8 * REGISTER_RAW_SIZE (L0_REGNUM), 1);
+                             8 * REGISTER_RAW_SIZE (L0_REGNUM));
        }
       else if (regno >= L0_REGNUM && regno <= I7_REGNUM)
        {
          if (!register_valid[regno])
-           abort ();
+           internal_error (__FILE__, __LINE__, "failed internal consistency check");
          if (regno >= L0_REGNUM && regno <= L0_REGNUM + 7)
            regoffset = REGISTER_BYTE (regno) - REGISTER_BYTE (L0_REGNUM)
              + FRAME_SAVED_L0;
          else
            regoffset = REGISTER_BYTE (regno) - REGISTER_BYTE (I0_REGNUM)
              + FRAME_SAVED_I0;
-         target_xfer_memory (sp + regoffset, &registers[REGISTER_BYTE (regno)],
-                             REGISTER_RAW_SIZE (regno), 1);
+         target_write_memory (sp + regoffset, 
+                             &registers[REGISTER_BYTE (regno)],
+                             REGISTER_RAW_SIZE (regno));
        }
     }
 
@@ -468,8 +468,7 @@ store_inferior_registers (regno)
    saved context block.  */
 
 static unsigned long
-registers_addr (pid)
-     int pid;
+registers_addr (int pid)
 {
   CORE_ADDR stblock;
   int ecpoff = offsetof (st_t, ecp);
@@ -494,8 +493,7 @@ registers_addr (pid)
    marking them as valid so we won't fetch them again.  */
 
 void
-fetch_inferior_registers (regno)
-     int regno;
+fetch_inferior_registers (int regno)
 {
   int reglo, reghi;
   int i;
@@ -546,8 +544,7 @@ fetch_inferior_registers (regno)
 #endif
 
 void
-store_inferior_registers (regno)
-     int regno;
+store_inferior_registers (int regno)
 {
   int reglo, reghi;
   int i;
@@ -594,9 +591,7 @@ store_inferior_registers (regno)
    of error; store status through argument pointer OURSTATUS.  */
 
 int
-child_wait (pid, ourstatus)
-     int pid;
-     struct target_waitstatus *ourstatus;
+child_wait (int pid, struct target_waitstatus *ourstatus)
 {
   int save_errno;
   int thread;
@@ -715,8 +710,7 @@ child_wait (pid, ourstatus)
 
 /* Return nonzero if the given thread is still alive.  */
 int
-child_thread_alive (pid)
-     int pid;
+child_thread_alive (int pid)
 {
   /* Arggh.  Apparently pthread_kill only works for threads within
      the process that calls pthread_kill.
@@ -735,10 +729,7 @@ child_thread_alive (pid)
    If SIGNAL is nonzero, give it that signal.  */
 
 void
-child_resume (pid, step, signal)
-     int pid;
-     int step;
-     enum target_signal signal;
+child_resume (int pid, int step, enum target_signal signal)
 {
   int func;
 
@@ -774,8 +765,7 @@ child_resume (pid, step, signal)
    buffer.  */
 
 char *
-lynx_pid_to_str (pid)
-     int pid;
+child_pid_to_str (int pid)
 {
   static char buf[40];
 
@@ -798,11 +788,8 @@ lynx_pid_to_str (pid)
  */
 
 static void
-fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
-     char *core_reg_sect;
-     unsigned core_reg_size;
-     int which;
-     CORE_ADDR reg_addr;
+fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, int which,
+                     CORE_ADDR reg_addr)
 {
   struct st_entry s;
   unsigned int regno;
@@ -826,13 +813,15 @@ fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
 
 static struct core_fns lynx_core_fns =
 {
-  bfd_target_unknown_flavour,
-  fetch_core_registers,
-  NULL
+  bfd_target_unknown_flavour,          /* core_flavour */
+  default_check_format,                        /* check_format */
+  default_core_sniffer,                        /* core_sniffer */
+  fetch_core_registers,                        /* core_read_registers */
+  NULL                                 /* next */
 };
 
 void
-_initialize_core_lynx ()
+_initialize_core_lynx (void)
 {
   add_core_fns (&lynx_core_fns);
 }
This page took 0.039225 seconds and 4 git commands to generate.