This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH RFC] Protoize i386mach-nat.c, i960-tdep.c


More protoization...

	* i386mach-nat.c (fetch_inferior_registers, fetch_core_registers):
	Protoize.
	* i960-tdep.c (i960_skip_prologue, leafproc_return, mem): Protoize.

Index: i386mach-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/i386mach-nat.c,v
retrieving revision 1.4
diff -u -r1.4 i386mach-nat.c
--- i386mach-nat.c	2000/07/30 01:48:25	1.4
+++ i386mach-nat.c	2000/09/05 22:58:20
@@ -40,8 +40,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;
@@ -109,14 +108,21 @@
 
 
 
-/* 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;
 
Index: i960-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i960-tdep.c,v
retrieving revision 1.3
diff -u -r1.3 i960-tdep.c
--- i960-tdep.c	2000/07/30 01:48:25	1.3
+++ i960-tdep.c	2000/09/05 22:58:22
@@ -331,8 +331,7 @@
    prologue.  */
 
 CORE_ADDR
-i960_skip_prologue (ip)
-CORE_ADDR (ip);
+i960_skip_prologue (CORE_ADDR ip)
 {
   struct frame_saved_regs saved_regs_dummy;
   struct symtab_and_line sal;
@@ -479,9 +478,11 @@
 }
 
 /* Return address to which the currently executing leafproc will return,
-   or 0 if ip is not in a leafproc (or if we can't tell if it is).
+   or 0 if IP, the value of the instruction pointer from the currently
+   executing function, is not in a leafproc (or if we can't tell if it
+   is).
 
-   Do this by finding the starting address of the routine in which ip lies.
+   Do this by finding the starting address of the routine in which IP lies.
    If the instruction there is "mov g14, gx" (where x is in [0,7]), this
    is a leafproc and the return address is in register gx.  Well, this is
    true unless the return address points at a RET instruction in the current
@@ -489,8 +490,7 @@
    has been entered through the CALL entry point.  */
 
 CORE_ADDR
-leafproc_return (ip)
-     CORE_ADDR ip;		/* ip from currently executing function */
+leafproc_return (CORE_ADDR ip)
 {
   register struct minimal_symbol *msymbol;
   char *p;
@@ -684,12 +684,13 @@
   char numops;
 };
 
-static int			/* returns instruction length: 4 or 8 */
-mem (memaddr, word1, word2, noprint)
-     unsigned long memaddr;
-     unsigned long word1, word2;
-     int noprint;		/* If TRUE, return instruction length, but
-				   don't output any text.  */
+/* Return instruction length, either 4 or 8.  When NOPRINT is non-zero
+   (TRUE), don't output any text.  (Actually, as implemented, if NOPRINT
+   is 0, abort() is called.) */
+
+static int
+mem (unsigned long memaddr, unsigned long word1, unsigned long word2,
+     int noprint)
 {
   int i, j;
   int len;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]