This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH RFC] Protoize remote-eb.c, remote.es.c, remote-mm.c
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: [PATCH RFC] Protoize remote-eb.c, remote.es.c, remote-mm.c
- From: Kevin Buettner <kevinb at cygnus dot com>
- Date: Tue, 3 Oct 2000 16:11:17 -0700
More protoization...
I've decided to do the rest of the remote-*.c files three at a time.
There are not that many changes per file and the changes should be
quick to review since many of them deal with protoization of the
*_xfer_inferior_memory functions. (If this places an undue burden
on the reviewers, let me know, and I'll slow back down to two at
a time.)
* remote-eb.c (eb_xfer_inferior_memory): Protoize.
* remote-es.c (es1800_xfer_inferior_memory, es1800_files_info):
Protoize.
* remote-mm.c (expect_msg): Protoize.
Index: remote-eb.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-eb.c,v
retrieving revision 1.4
diff -u -r1.4 remote-eb.c
--- remote-eb.c 2000/09/01 00:12:10 1.4
+++ remote-eb.c 2000/10/03 22:55:29
@@ -871,15 +871,15 @@
/* Do nothing, since we can store individual regs */
}
+/* 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.
-/* FIXME-someday! Merge these two. */
+ Returns the number of bytes transferred. */
+
int
-eb_xfer_inferior_memory (memaddr, myaddr, len, write, target)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
- int write;
- struct target_ops *target; /* ignored */
+eb_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
+ struct target_ops *target)
{
if (write)
return eb_write_inferior_memory (memaddr, myaddr, len);
Index: remote-es.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-es.c,v
retrieving revision 1.4
diff -u -r1.4 remote-es.c
--- remote-es.c 2000/07/30 01:48:26 1.4
+++ remote-es.c 2000/10/03 22:55:33
@@ -954,15 +954,12 @@
memaddr - the target's address
myaddr - gdb's address
len - number of bytes
- write - write if != 0 otherwise read */
+ write - write if != 0 otherwise read
+ tops - unused */
static int
-es1800_xfer_inferior_memory (memaddr, myaddr, len, write, tops)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
- int write;
- struct target_ops *tops; /* Unused */
+es1800_xfer_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len,
+ int write, struct target_ops *tops)
{
int origlen = len;
int xfersize;
@@ -1065,11 +1062,10 @@
}
}
-/* Information about the current target */
+/* Display information about the current target. TOPS is unused. */
static void
-es1800_files_info (tops)
- struct target_ops *tops; /* Unused */
+es1800_files_info (struct target_ops *tops)
{
printf ("ES1800 Attached to %s at %d baud in %s mode\n", savename, 19200,
MODE);
Index: remote-mm.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-mm.c,v
retrieving revision 1.3
diff -u -r1.3 remote-mm.c
--- remote-mm.c 2000/07/30 01:48:26 1.3
+++ remote-mm.c 2000/10/03 22:55:35
@@ -1698,15 +1698,15 @@
return (cbuf);
}
/****************************************************************************/
-/*
- * Receive a message and expect it to be of type msgcode.
- * Returns 0/1 on failure/success.
- */
+
+/* Receive a message, placing it in MSG_BUF, and expect it to be of
+ type MSGCODE. If an error occurs, a non-zero FROM_TTY indicates
+ that the message should be printed.
+
+ Return 0 for failure, 1 for success. */
+
static int
-expect_msg (msgcode, msg_buf, from_tty)
- INT32 msgcode; /* Msg code we expect */
- union msg_t *msg_buf; /* Where to put the message received */
- int from_tty; /* Print message on error if non-zero */
+expect_msg (INT32 msgcode, union msg_t *msg_buf, int from_tty)
{
int retries = 0;
while (msg_recv_serial (msg_buf) && (retries++ < MAX_RETRIES));