aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-os9k.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2000-07-30 01:48:28 +0000
committerKevin Buettner <kevinb@redhat.com>2000-07-30 01:48:28 +0000
commitfba45db2faf619e71856ee38ec63949c0ef6903e (patch)
tree107efc21d2b12f54d84b59e75251449e3d5fd096 /gdb/remote-os9k.c
parent29e6d33b03a5e39540d17bc8235573b1dac13341 (diff)
downloadgdb-fba45db2faf619e71856ee38ec63949c0ef6903e.zip
gdb-fba45db2faf619e71856ee38ec63949c0ef6903e.tar.gz
gdb-fba45db2faf619e71856ee38ec63949c0ef6903e.tar.bz2
Protoization.
Diffstat (limited to 'gdb/remote-os9k.c')
-rw-r--r--gdb/remote-os9k.c103
1 files changed, 31 insertions, 72 deletions
diff --git a/gdb/remote-os9k.c b/gdb/remote-os9k.c
index fd758b5..3e1a1ee 100644
--- a/gdb/remote-os9k.c
+++ b/gdb/remote-os9k.c
@@ -105,8 +105,7 @@ printf_monitor (char *pattern,...)
/* Read a character from the remote system, doing all the fancy timeout stuff */
static int
-readchar (timeout)
- int timeout;
+readchar (int timeout)
{
int c;
@@ -136,9 +135,7 @@ readchar (timeout)
non-zero, then discard non-matching input, else print it out.
Let the user break out immediately. */
static void
-expect (string, discard)
- char *string;
- int discard;
+expect (char *string, int discard)
{
char *p = string;
int c;
@@ -190,8 +187,7 @@ expect (string, discard)
necessary to prevent getting into states from which we can't
recover. */
static void
-expect_prompt (discard)
- int discard;
+expect_prompt (int discard)
{
if (monitor_log)
/* This is a convenient place to do this. The idea is to do it often
@@ -211,8 +207,7 @@ expect_prompt (discard)
/* Get a hex digit from the remote system & return its value.
If ignore_space is nonzero, ignore spaces (not newline, tab, etc). */
static int
-get_hex_digit (ignore_space)
- int ignore_space;
+get_hex_digit (int ignore_space)
{
int ch;
while (1)
@@ -237,8 +232,7 @@ get_hex_digit (ignore_space)
/* Get a byte from monitor and put it in *BYT. Accept any number
leading spaces. */
static void
-get_hex_byte (byt)
- char *byt;
+get_hex_byte (char *byt)
{
int val;
@@ -250,9 +244,7 @@ get_hex_byte (byt)
/* Get N 32-bit words from remote, each preceded by a space,
and put them in registers starting at REGNO. */
static void
-get_hex_regs (n, regno)
- int n;
- int regno;
+get_hex_regs (int n, int regno)
{
long val;
int i;
@@ -278,10 +270,7 @@ get_hex_regs (n, regno)
/* This is called not only when we first attach, but also when the
user types "run" after having attached. */
static void
-rombug_create_inferior (execfile, args, env)
- char *execfile;
- char *args;
- char **env;
+rombug_create_inferior (char *execfile, char *args, char **env)
{
int entry_pt;
@@ -310,9 +299,7 @@ rombug_create_inferior (execfile, args, env)
static char dev_name[100];
static void
-rombug_open (args, from_tty)
- char *args;
- int from_tty;
+rombug_open (char *args, int from_tty)
{
if (args == NULL)
error ("Use `target RomBug DEVICE-NAME' to use a serial port, or \n\
@@ -380,8 +367,7 @@ rombug_open (args, from_tty)
*/
static void
-rombug_close (quitting)
- int quitting;
+rombug_close (int quitting)
{
if (rombug_is_open)
{
@@ -401,9 +387,7 @@ rombug_close (quitting)
}
int
-rombug_link (mod_name, text_reloc)
- char *mod_name;
- CORE_ADDR *text_reloc;
+rombug_link (char *mod_name, CORE_ADDR *text_reloc)
{
int i, j;
unsigned long val;
@@ -431,8 +415,7 @@ rombug_link (mod_name, text_reloc)
Use this when you want to detach and do something else
with your gdb. */
static void
-rombug_detach (from_tty)
- int from_tty;
+rombug_detach (int from_tty)
{
if (attach_flag)
{
@@ -448,9 +431,7 @@ rombug_detach (from_tty)
* Tell the remote machine to resume.
*/
static void
-rombug_resume (pid, step, sig)
- int pid, step;
- enum target_signal sig;
+rombug_resume (int pid, int step, enum target_signal sig)
{
if (monitor_log)
fprintf (log_file, "\nIn Resume (step=%d, sig=%d)\n", step, sig);
@@ -480,9 +461,7 @@ rombug_resume (pid, step, sig)
*/
static int
-rombug_wait (pid, status)
- int pid;
- struct target_waitstatus *status;
+rombug_wait (int pid, struct target_waitstatus *status)
{
int old_timeout = timeout;
struct section_offsets *offs;
@@ -528,8 +507,7 @@ rombug_wait (pid, status)
monitor wants. Lets take advantage of that just as long as possible! */
static char *
-get_reg_name (regno)
- int regno;
+get_reg_name (int regno)
{
static char buf[50];
char *p;
@@ -554,7 +532,7 @@ get_reg_name (regno)
/* read the remote registers into the block regs. */
static void
-rombug_fetch_registers ()
+rombug_fetch_registers (void)
{
int regno, j, i;
long val;
@@ -615,8 +593,7 @@ rombug_fetch_registers ()
/* Fetch register REGNO, or all registers if REGNO is -1.
Returns errno value. */
static void
-rombug_fetch_register (regno)
- int regno;
+rombug_fetch_register (int regno)
{
int val, j;
unsigned char b;
@@ -683,7 +660,7 @@ rombug_fetch_register (regno)
/* Store the remote registers from the contents of the block REGS. */
static void
-rombug_store_registers ()
+rombug_store_registers (void)
{
int regno;
@@ -696,8 +673,7 @@ rombug_store_registers ()
/* Store register REGNO, or all if REGNO == 0.
return errno value. */
static void
-rombug_store_register (regno)
- int regno;
+rombug_store_register (int regno)
{
char *name;
@@ -728,13 +704,13 @@ rombug_store_register (regno)
debugged. */
static void
-rombug_prepare_to_store ()
+rombug_prepare_to_store (void)
{
/* Do nothing, since we can store individual regs */
}
static void
-rombug_files_info ()
+rombug_files_info (void)
{
printf ("\tAttached to %s at %d baud.\n",
dev_name, sr_get_baud_rate ());
@@ -743,10 +719,7 @@ rombug_files_info ()
/* Copy LEN bytes of data from debugger memory at MYADDR
to inferior's memory at MEMADDR. Returns length moved. */
static int
-rombug_write_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- unsigned char *myaddr;
- int len;
+rombug_write_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
{
int i;
char buf[10];
@@ -776,10 +749,7 @@ rombug_write_inferior_memory (memaddr, myaddr, len)
/* Read LEN bytes from inferior memory at MEMADDR. Put the result
at debugger address MYADDR. Returns length moved. */
static int
-rombug_read_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
+rombug_read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
int i, j;
@@ -864,9 +834,7 @@ rombug_xfer_inferior_memory (memaddr, myaddr, len, write, target)
}
static void
-rombug_kill (args, from_tty)
- char *args;
- int from_tty;
+rombug_kill (char *args, int from_tty)
{
return; /* ignore attempts to kill target system */
}
@@ -877,7 +845,7 @@ rombug_kill (args, from_tty)
instructions. */
static void
-rombug_mourn_inferior ()
+rombug_mourn_inferior (void)
{
remove_breakpoints ();
generic_mourn_inferior (); /* Do all the proper things now */
@@ -889,9 +857,7 @@ static CORE_ADDR breakaddr[MAX_MONITOR_BREAKPOINTS] =
{0};
static int
-rombug_insert_breakpoint (addr, shadow)
- CORE_ADDR addr;
- char *shadow;
+rombug_insert_breakpoint (CORE_ADDR addr, char *shadow)
{
int i;
CORE_ADDR bp_addr = addr;
@@ -922,9 +888,7 @@ rombug_insert_breakpoint (addr, shadow)
* _remove_breakpoint -- Tell the monitor to remove a breakpoint
*/
static int
-rombug_remove_breakpoint (addr, shadow)
- CORE_ADDR addr;
- char *shadow;
+rombug_remove_breakpoint (CORE_ADDR addr, char *shadow)
{
int i;
@@ -950,8 +914,7 @@ rombug_remove_breakpoint (addr, shadow)
#define DOWNLOAD_LINE_SIZE 100
static void
-rombug_load (arg)
- char *arg;
+rombug_load (char *arg)
{
/* this part comment out for os9* */
#if 0
@@ -1013,9 +976,7 @@ rombug_load (arg)
is seen. */
static void
-rombug_command (args, fromtty)
- char *args;
- int fromtty;
+rombug_command (char *args, int fromtty)
{
if (monitor_desc == NULL)
error ("monitor target not open.");
@@ -1037,16 +998,14 @@ rombug_command (args, fromtty)
static struct ttystate ttystate;
static void
-cleanup_tty ()
+cleanup_tty (void)
{
printf ("\r\n[Exiting connect mode]\r\n");
/*SERIAL_RESTORE(0, &ttystate); */
}
static void
-connect_command (args, fromtty)
- char *args;
- int fromtty;
+connect_command (char *args, int fromtty)
{
fd_set readfds;
int numfds;
@@ -1221,7 +1180,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).",
}
void
-_initialize_remote_os9k ()
+_initialize_remote_os9k (void)
{
init_rombug_ops ();
add_target (&rombug_ops);