+<<<<<<< 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.
#include "defs.h"
#include "frame.h"
#include "inferior.h"
-#include "gdbcore.h"
#include "target.h"
#include <sys/ptrace.h>
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;
{
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;
}
}
-/* 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. */
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);
+ }
+}