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 remote-bug.c, remote-e7000.c


More protoization...

	* remote-bug.c (bug_xfer_memory, bug_insert_breakpoint,
	bug_remove_breakpoint): Protoize.
	* remote-e7000.c (fetch_regs_from_dump, e7000_xfer_inferior_memory):
	Protoize.

Index: remote-bug.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-bug.c,v
retrieving revision 1.6
diff -u -r1.6 remote-bug.c
--- remote-bug.c	2000/08/18 22:52:22	1.6
+++ remote-bug.c	2000/10/02 00:58:57
@@ -553,13 +553,15 @@
   return;
 }
 
+/* Transfer LEN bytes between GDB address MYADDR and target address
+   MEMADDR.  If WRITE is non-zero, transfer them to the target,
+   otherwise transfer them from the target.  TARGET is unused.
+
+   Returns the number of bytes transferred. */
+
 int
-bug_xfer_memory (memaddr, myaddr, len, write, target)
-     CORE_ADDR memaddr;
-     char *myaddr;
-     int len;
-     int write;
-     struct target_ops *target;	/* ignored */
+bug_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
+		 struct target_ops *target)
 {
   if (len <= 0)
     return 0;
@@ -823,10 +825,14 @@
 
 #define MAX_BREAKS	16
 static int num_brkpts = 0;
+
+/* Insert a breakpoint at ADDR.  SAVE is normally the address of the
+   pattern buffer where the instruction that the breakpoint overwrites
+   is saved.  It is unused here since the bug is responsible for
+   saving/restoring the original instruction. */
+
 static int
-bug_insert_breakpoint (addr, save)
-     CORE_ADDR addr;
-     char *save;		/* Throw away, let bug save instructions */
+bug_insert_breakpoint (CORE_ADDR addr, char *save)
 {
   sr_check_open ();
 
@@ -848,10 +854,13 @@
     }
 
 }
+
+/* Remove a breakpoint at ADDR.  SAVE is normally the previously
+   saved pattern, but is unused here since the bug is responsible
+   for saving/restoring instructions. */
+
 static int
-bug_remove_breakpoint (addr, save)
-     CORE_ADDR addr;
-     char *save;		/* Throw away, let bug save instructions */
+bug_remove_breakpoint (CORE_ADDR addr, char *save)
 {
   if (num_brkpts > 0)
     {
Index: remote-e7000.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-e7000.c,v
retrieving revision 1.8
diff -u -r1.8 remote-e7000.c
--- remote-e7000.c	2000/09/01 00:12:10	1.8
+++ remote-e7000.c	2000/10/02 00:58:59
@@ -795,9 +795,7 @@
 }
 
 void
-fetch_regs_from_dump (nextchar, want)
-     int (*nextchar) ();
-     char *want;
+fetch_regs_from_dump (int (*nextchar) (), char *want)
 {
   int regno;
   char buf[MAX_REGISTER_RAW_SIZE];
@@ -1468,13 +1466,15 @@
 
 #endif
 
+/* Transfer LEN bytes between GDB address MYADDR and target address
+   MEMADDR.  If WRITE is non-zero, transfer them to the target,
+   otherwise transfer them from the target.  TARGET is unused.
+
+   Returns the number of bytes transferred. */
+
 static int
-e7000_xfer_inferior_memory (memaddr, myaddr, len, write, target)
-     CORE_ADDR memaddr;
-     unsigned char *myaddr;
-     int len;
-     int write;
-     struct target_ops *target;	/* ignored */
+e7000_xfer_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr,
+			    int len, int write, struct target_ops *target)
 {
   if (write)
     return e7000_write_inferior_memory (memaddr, myaddr, len);


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