Wed Nov 20 16:15:15 1996 Geoffrey Noer <noer@cygnus.com>
[deliverable/binutils-gdb.git] / gdb / i386lynx-nat.c
index c8922adbb240f3d8d268bd8e307196775f29f9da..27c605bf2baa378eb6aa992501906d213724304b 100644 (file)
@@ -1,5 +1,7 @@
+<<<<<<< 2.6 is dead >>>>>>>
 /* Native-dependent code for Lynx running on i386's, for GDB.
-   Copyright 1988, 1989, 1991, 1992, 1993 Free Software Foundation, Inc.
+   Copyright 1988, 1989, 1991, 1992, 1993
+   Free Software Foundation, Inc.
 
 This file is part of GDB.
 
@@ -20,7 +22,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include "defs.h"
 #include "frame.h"
 #include "inferior.h"
-#include "gdbcore.h"
 #include "target.h"
 
 #include <sys/ptrace.h>
@@ -183,44 +184,14 @@ store_inferior_registers (regno)
       store_register (regno, offset, inferior_pid);
 }
 
-/* Extract the register values out of the core file and store
-   them where `read_register' will find them.
-
-   CORE_REG_SECT points to the register values themselves, read into memory.
-   CORE_REG_SIZE is the size of that area.
-   WHICH says which set of registers we are handling (0 = int, 2 = float
-         on machines where they are discontiguous).
-   REG_ADDR is the offset from u.u_ar0 to the register values relative to
-            core_reg_sect.  This is used with old-fashioned core files to
-           locate the registers in a large upage-plus-stack ".reg" section.
-           Original upage address X is at location core_reg_sect+x+reg_addr.
- */
-
-void
-fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
-     char *core_reg_sect;
-     unsigned core_reg_size;
-     int which;
-     unsigned reg_addr;
-{
-  struct st_entry s;
-  unsigned int regno, addr;
-
-  for (regno = 0; regno < NUM_REGS; regno++)
-    {
-      addr = register_addr (regno, (char *) &s.ec - (char *) &s);
-      supply_register (regno, core_reg_sect + addr);
-    }
-}
-
 /* Wait for child to do something.  Return pid of child, or -1 in case
    of error; store status through argument pointer STATUS.  */
 
 int
-child_wait (status)
+child_wait (pid, status)
+     int pid;
      int *status;
 {
-  int pid;
   int save_errno;
   int thread;
 
@@ -241,7 +212,7 @@ child_wait (status)
        {
          if (save_errno == EINTR)
            continue;
-         fprintf (stderr, "Child process unexpectedly missing: %s.\n",
+         fprintf_unfiltered (gdb_stderr, "Child process unexpectedly missing: %s.\n",
                   safe_strerror (save_errno));
          *status = 42;         /* Claim it exited with signal 42 */
          return -1;
@@ -268,26 +239,6 @@ child_wait (status)
     }
 }
 
-/* Return the PC of the caller from the call frame.  Assumes the subr prologue
-   has already been executed, and the frame pointer setup.  If this is the
-   outermost frame, we check to see if we are in a system call by examining the
-   previous instruction.  If so, then the return PC is actually at SP+4 because
-   system calls use a different calling sequence.  */
-
-CORE_ADDR
-i386lynx_saved_pc_after_call (frame)
-     struct frame_info *frame;
-{
-  char opcode[7];
-  static const char call_inst[] = {0x9a, 0, 0, 0, 0, 8, 0}; /* lcall 0x8,0x0 */
-
-  read_memory (frame->pc - 7, opcode, 7);
-  if (memcmp (opcode, call_inst, 7) == 0)
-    return read_memory_integer (read_register (SP_REGNUM) + 4, 4);
-
-  return read_memory_integer (read_register (SP_REGNUM), 4);
-}
-
 /* Convert a Lynx process ID to a string.  Returns the string in a static
    buffer.  */
 
@@ -301,3 +252,33 @@ i386lynx_pid_to_str (pid)
 
   return buf;
 }
+
+/* Extract the register values out of the core file and store
+   them where `read_register' will find them.
+
+   CORE_REG_SECT points to the register values themselves, read into memory.
+   CORE_REG_SIZE is the size of that area.
+   WHICH says which set of registers we are handling (0 = int, 2 = float
+         on machines where they are discontiguous).
+   REG_ADDR is the offset from u.u_ar0 to the register values relative to
+            core_reg_sect.  This is used with old-fashioned core files to
+           locate the registers in a large upage-plus-stack ".reg" section.
+           Original upage address X is at location core_reg_sect+x+reg_addr.
+ */
+
+void
+fetch_core_registers (core_reg_sect, core_reg_size, which, reg_addr)
+     char *core_reg_sect;
+     unsigned core_reg_size;
+     int which;
+     unsigned reg_addr;
+{
+  struct st_entry s;
+  unsigned int regno, addr;
+
+  for (regno = 0; regno < NUM_REGS; regno++)
+    {
+      addr = register_addr (regno, (char *) &s.ec - (char *) &s);
+      supply_register (regno, core_reg_sect + addr);
+    }
+}
This page took 0.025688 seconds and 4 git commands to generate.