From 69dc947abb7ab24bac6cf62db6d05e4b85c6758e Mon Sep 17 00:00:00 2001 From: Kevin Buettner Date: Tue, 3 Oct 2000 22:42:32 +0000 Subject: [PATCH] Protoization. --- gdb/ChangeLog | 7 +++++++ gdb/remote-bug.c | 33 +++++++++++++++++++++------------ gdb/remote-e7000.c | 18 +++++++++--------- 3 files changed, 37 insertions(+), 21 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0b152f617d7..2b23a155182 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2000-10-03 Kevin Buettner + + * 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. + 2000-10-01 Kevin Buettner * remote-adapt.c (adapt_insert_breakpoint, adapt_remove_breakpoint): diff --git a/gdb/remote-bug.c b/gdb/remote-bug.c index aac148eb5f4..25b769e3fad 100644 --- a/gdb/remote-bug.c +++ b/gdb/remote-bug.c @@ -553,13 +553,15 @@ bug_store_register (int regno) 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 @@ done: #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 @@ bug_insert_breakpoint (addr, save) } } + +/* 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) { diff --git a/gdb/remote-e7000.c b/gdb/remote-e7000.c index ae89e829d2e..be88feff523 100644 --- a/gdb/remote-e7000.c +++ b/gdb/remote-e7000.c @@ -795,9 +795,7 @@ gbyte (void) } 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 @@ fast_but_for_the_pause_e7000_read_inferior_memory (CORE_ADDR memaddr, #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); -- 2.30.2