From e082ddcac652043505c6d117cab8c66cea33fa78 Mon Sep 17 00:00:00 2001 From: Kevin Buettner Date: Mon, 2 Oct 2000 00:49:55 +0000 Subject: [PATCH] Protoization. --- gdb/ChangeLog | 6 ++++++ gdb/remote-adapt.c | 19 +++++++++++++------ gdb/remote-array.c | 19 +++++++++---------- 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d7041645193..0b152f617d7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2000-10-01 Kevin Buettner + + * remote-adapt.c (adapt_insert_breakpoint, adapt_remove_breakpoint): + Protoize. + * remote-array.c (write_monitor, array_xfer_memory): Protoize. + 2000-09-29 Kevin Buettner * ppc-linux-nat.c (supply_gregset, fill_gregset): Change type diff --git a/gdb/remote-adapt.c b/gdb/remote-adapt.c index f5cc1234d2b..6e97c1983a0 100644 --- a/gdb/remote-adapt.c +++ b/gdb/remote-adapt.c @@ -1293,10 +1293,14 @@ adapt_read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len) #define MAX_BREAKS 8 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 Adapt Monitor is responsible + for saving/restoring the original instruction. */ + static int -adapt_insert_breakpoint (addr, save) - CORE_ADDR addr; - char *save; /* Throw away, let adapt save instructions */ +adapt_insert_breakpoint (CORE_ADDR addr, char *save) { if (num_brkpts < MAX_BREAKS) { @@ -1314,10 +1318,13 @@ adapt_insert_breakpoint (addr, save) } } + +/* Remove a breakpoint at ADDR. SAVE is normally the previously + saved pattern, but is unused here as the Adapt Monitor is + responsible for saving/restoring instructions. */ + static int -adapt_remove_breakpoint (addr, save) - CORE_ADDR addr; - char *save; /* Throw away, let adapt save instructions */ +adapt_remove_breakpoint (CORE_ADDR addr, char *save) { if (num_brkpts > 0) { diff --git a/gdb/remote-array.c b/gdb/remote-array.c index 9c3a9d79cef..cd3cff3e11e 100644 --- a/gdb/remote-array.c +++ b/gdb/remote-array.c @@ -216,9 +216,7 @@ printf_monitor (char *pattern,...) * write_monitor -- send raw data to monitor. */ static void -write_monitor (data, len) - char data[]; - int len; +write_monitor (char data[], int len) { if (SERIAL_WRITE (array_desc, data, len)) fprintf (stderr, "SERIAL_WRITE failed: %s\n", safe_strerror (errno)); @@ -1020,14 +1018,15 @@ array_read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len) return (count); } -/* FIXME-someday! merge these two. */ +/* 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 -array_xfer_memory (memaddr, myaddr, len, write, target) - CORE_ADDR memaddr; - char *myaddr; - int len; - int write; - struct target_ops *target; /* ignored */ +array_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write, + struct target_ops *target) { if (write) return array_write_inferior_memory (memaddr, myaddr, len); -- 2.30.2