2001-04-03 David Mosberger <davidm@hpl.hp.com>
[deliverable/binutils-gdb.git] / gdb / i386mach-nat.c
index ded044b75b92c2ffc051a1f0c5982482bc2a9296..1dfa7a50e8f036957450912f54d145a57b957f2f 100644 (file)
@@ -1,5 +1,6 @@
 /* Native dependent code for Mach 386's for GDB, the GNU debugger.
-   Copyright (C) 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc.
+   Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1995, 1996, 1999, 2000,
+   2001 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -22,6 +23,7 @@
 #include "frame.h"
 #include "inferior.h"
 #include "gdbcore.h"
+#include "regcache.h"
 
 #include <sys/param.h>
 #include <sys/dir.h>
@@ -40,8 +42,7 @@
 static void fetch_core_registers (char *, unsigned, int, CORE_ADDR);
 
 void
-fetch_inferior_registers (regno)
-     int regno;                        /* Original value discarded */
+fetch_inferior_registers (int regno)
 {
   struct regs inferior_registers;
   struct fp_state inferior_fp_registers;
@@ -68,8 +69,7 @@ fetch_inferior_registers (regno)
    Otherwise, REGNO specifies which register (so we can save time).  */
 
 void
-store_inferior_registers (regno)
-     int regno;
+store_inferior_registers (int regno)
 {
   struct regs inferior_registers;
   struct fp_state inferior_fp_registers;
@@ -110,14 +110,21 @@ store_inferior_registers (regno)
 
 
 
-/* Work with core files, for GDB. */
+/* Provide registers to GDB from a core file.
+
+   CORE_REG_SECT points to an array of bytes, which were obtained from
+   a core file which BFD thinks might contain register contents. 
+   CORE_REG_SIZE is its size.
+
+   WHICH says which register set corelow suspects this is:
+     0 --- the general-purpose register set
+     2 --- the floating-point register set
+
+   REG_ADDR isn't used.  */
 
 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;       /* Unused in this version */
+fetch_core_registers (char *core_reg_sect, unsigned core_reg_size,
+                     int which, CORE_ADDR reg_addr)
 {
   int val;
 
@@ -156,7 +163,7 @@ static struct core_fns i386mach_core_fns =
 };
 
 void
-_initialize_core_i386mach ()
+_initialize_core_i386mach (void)
 {
   add_core_fns (&i386mach_core_fns);
 }
This page took 0.023357 seconds and 4 git commands to generate.