aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver
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/gdbserver
parent29e6d33b03a5e39540d17bc8235573b1dac13341 (diff)
downloadgdb-fba45db2faf619e71856ee38ec63949c0ef6903e.zip
gdb-fba45db2faf619e71856ee38ec63949c0ef6903e.tar.gz
gdb-fba45db2faf619e71856ee38ec63949c0ef6903e.tar.bz2
Protoization.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r--gdb/gdbserver/gdbreplay.c26
-rw-r--r--gdb/gdbserver/low-hppabsd.c41
-rw-r--r--gdb/gdbserver/low-linux.c55
-rw-r--r--gdb/gdbserver/low-lynx.c42
-rw-r--r--gdb/gdbserver/low-nbsd.c44
-rw-r--r--gdb/gdbserver/low-sim.c40
-rw-r--r--gdb/gdbserver/low-sparc.c34
-rw-r--r--gdb/gdbserver/low-sun3.c34
-rw-r--r--gdb/gdbserver/remote-utils.c59
-rw-r--r--gdb/gdbserver/utils.c3
10 files changed, 116 insertions, 262 deletions
diff --git a/gdb/gdbserver/gdbreplay.c b/gdb/gdbserver/gdbreplay.c
index 9e88a75..4fabf1d 100644
--- a/gdb/gdbserver/gdbreplay.c
+++ b/gdb/gdbserver/gdbreplay.c
@@ -41,8 +41,7 @@ static int remote_desc;
Then return to command level. */
void
-perror_with_name (string)
- char *string;
+perror_with_name (char *string)
{
#ifndef STDC_HEADERS
extern int sys_nerr;
@@ -63,11 +62,7 @@ perror_with_name (string)
}
static void
-sync_error (fp, desc, expect, got)
- FILE *fp;
- char *desc;
- int expect;
- int got;
+sync_error (FILE *fp, char *desc, int expect, int got)
{
fprintf (stderr, "\n%s\n", desc);
fprintf (stderr, "At logfile offset %ld, expected '0x%x' got '0x%x'\n",
@@ -77,7 +72,7 @@ sync_error (fp, desc, expect, got)
}
void
-remote_close ()
+remote_close (void)
{
close (remote_desc);
}
@@ -86,8 +81,7 @@ remote_close ()
NAME is the filename used for communication. */
void
-remote_open (name)
- char *name;
+remote_open (char *name)
{
extern char *strchr ();
@@ -159,8 +153,7 @@ remote_open (name)
}
static int
-tohex (ch)
- int ch;
+tohex (int ch)
{
if (ch >= '0' && ch <= '9')
{
@@ -180,8 +173,7 @@ tohex (ch)
}
static int
-logchar (fp)
- FILE *fp;
+logchar (FILE *fp)
{
int ch;
int ch2;
@@ -244,8 +236,7 @@ logchar (fp)
blank) up until a \n is read from fp (which is not matched) */
void
-expect (fp)
- FILE *fp;
+expect (FILE *fp)
{
int fromlog;
unsigned char fromgdb;
@@ -276,8 +267,7 @@ expect (fp)
\n is read from fp (which is discarded and not sent to gdb). */
void
-play (fp)
- FILE *fp;
+play (FILE *fp)
{
int fromlog;
char ch;
diff --git a/gdb/gdbserver/low-hppabsd.c b/gdb/gdbserver/low-hppabsd.c
index de78ad5..e85c0b2 100644
--- a/gdb/gdbserver/low-hppabsd.c
+++ b/gdb/gdbserver/low-hppabsd.c
@@ -58,9 +58,7 @@ int query ();
ENV is the environment vector to pass. */
int
-create_inferior (program, allargs)
- char *program;
- char **allargs;
+create_inferior (char *program, char **allargs)
{
int pid;
@@ -86,7 +84,7 @@ create_inferior (program, allargs)
/* Kill the inferior process. Make us have no inferior. */
void
-kill_inferior ()
+kill_inferior (void)
{
if (inferior_pid == 0)
return;
@@ -97,8 +95,7 @@ kill_inferior ()
/* Return nonzero if the given thread is still alive. */
int
-mythread_alive (pid)
- int pid;
+mythread_alive (int pid)
{
return 1;
}
@@ -106,8 +103,7 @@ mythread_alive (pid)
/* Wait for process, returns status */
unsigned char
-mywait (status)
- char *status;
+mywait (char *status)
{
int pid;
union wait w;
@@ -140,9 +136,7 @@ mywait (status)
If SIGNAL is nonzero, give it that signal. */
void
-myresume (step, signal)
- int step;
- int signal;
+myresume (int step, int signal)
{
errno = 0;
ptrace (step ? PT_STEP : PT_CONTINUE, inferior_pid, 1, signal, 0);
@@ -164,9 +158,7 @@ myresume (step, signal)
#endif
CORE_ADDR
-register_addr (regno, blockend)
- int regno;
- CORE_ADDR blockend;
+register_addr (int regno, CORE_ADDR blockend)
{
CORE_ADDR addr;
@@ -181,8 +173,7 @@ register_addr (regno, blockend)
/* Fetch one register. */
static void
-fetch_register (regno)
- int regno;
+fetch_register (int regno)
{
register unsigned int regaddr;
char buf[MAX_REGISTER_RAW_SIZE];
@@ -217,8 +208,7 @@ error_exit:;
/* Fetch all registers, or just one, from the child process. */
void
-fetch_inferior_registers (regno)
- int regno;
+fetch_inferior_registers (int regno)
{
if (regno == -1 || regno == 0)
for (regno = 0; regno < NUM_REGS; regno++)
@@ -232,8 +222,7 @@ fetch_inferior_registers (regno)
Otherwise, REGNO specifies which register (so we can save time). */
void
-store_inferior_registers (regno)
- int regno;
+store_inferior_registers (int regno)
{
register unsigned int regaddr;
char buf[80];
@@ -295,10 +284,7 @@ store_inferior_registers (regno)
/* Copy LEN bytes from inferior's memory starting at MEMADDR
to debugger memory starting at MYADDR. */
-read_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
+read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
register int i;
/* Round starting address down to longword boundary. */
@@ -325,10 +311,7 @@ read_inferior_memory (memaddr, myaddr, len)
returns the value of errno. */
int
-write_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
+write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
register int i;
/* Round starting address down to longword boundary. */
@@ -369,6 +352,6 @@ write_inferior_memory (memaddr, myaddr, len)
}
void
-initialize_low ()
+initialize_low (void)
{
}
diff --git a/gdb/gdbserver/low-linux.c b/gdb/gdbserver/low-linux.c
index 75b6085..7df5157 100644
--- a/gdb/gdbserver/low-linux.c
+++ b/gdb/gdbserver/low-linux.c
@@ -66,9 +66,7 @@ static void initialize_arch (void);
ENV is the environment vector to pass. */
int
-create_inferior (program, allargs)
- char *program;
- char **allargs;
+create_inferior (char *program, char **allargs)
{
int pid;
@@ -94,7 +92,7 @@ create_inferior (program, allargs)
/* Kill the inferior process. Make us have no inferior. */
void
-kill_inferior ()
+kill_inferior (void)
{
if (inferior_pid == 0)
return;
@@ -105,8 +103,7 @@ kill_inferior ()
/* Return nonzero if the given thread is still alive. */
int
-mythread_alive (pid)
- int pid;
+mythread_alive (int pid)
{
return 1;
}
@@ -114,8 +111,7 @@ mythread_alive (pid)
/* Wait for process, returns status */
unsigned char
-mywait (status)
- char *status;
+mywait (char *status)
{
int pid;
union wait w;
@@ -148,9 +144,7 @@ mywait (status)
If SIGNAL is nonzero, give it that signal. */
void
-myresume (step, signal)
- int step;
- int signal;
+myresume (int step, int signal)
{
errno = 0;
ptrace (step ? PTRACE_SINGLESTEP : PTRACE_CONT, inferior_pid, 1, signal);
@@ -191,7 +185,7 @@ int i386_register_raw_size[MAX_NUM_REGS] = {
int i386_register_byte[MAX_NUM_REGS];
static void
-initialize_arch ()
+initialize_arch (void)
{
/* Initialize the table saying where each register starts in the
register file. */
@@ -218,9 +212,7 @@ static int regmap[] =
};
int
-i386_register_u_addr (blockend, regnum)
- int blockend;
- int regnum;
+i386_register_u_addr (int blockend, int regnum)
{
#if 0
/* this will be needed if fp registers are reinstated */
@@ -242,7 +234,7 @@ i386_register_u_addr (blockend, regnum)
}
#elif defined(TARGET_M68K)
static void
-initialize_arch ()
+initialize_arch (void)
{
return;
}
@@ -270,9 +262,7 @@ static int regmap[] =
is stored. */
int
-m68k_linux_register_u_addr (blockend, regnum)
- int blockend;
- int regnum;
+m68k_linux_register_u_addr (int blockend, int regnum)
{
return (blockend + 4 * regmap[regnum]);
}
@@ -551,16 +541,14 @@ ia64_register_u_addr (int blockend, int regnum)
}
static void
-initialize_arch ()
+initialize_arch (void)
{
return;
}
#endif
CORE_ADDR
-register_addr (regno, blockend)
- int regno;
- CORE_ADDR blockend;
+register_addr (int regno, CORE_ADDR blockend)
{
CORE_ADDR addr;
@@ -575,8 +563,7 @@ register_addr (regno, blockend)
/* Fetch one register. */
static void
-fetch_register (regno)
- int regno;
+fetch_register (int regno)
{
CORE_ADDR regaddr;
register int i;
@@ -610,8 +597,7 @@ error_exit:;
/* Fetch all registers, or just one, from the child process. */
void
-fetch_inferior_registers (regno)
- int regno;
+fetch_inferior_registers (int regno)
{
if (regno == -1 || regno == 0)
for (regno = 0; regno < NUM_REGS - NUM_FREGS; regno++)
@@ -625,8 +611,7 @@ fetch_inferior_registers (regno)
Otherwise, REGNO specifies which register (so we can save time). */
void
-store_inferior_registers (regno)
- int regno;
+store_inferior_registers (int regno)
{
CORE_ADDR regaddr;
int i;
@@ -690,10 +675,7 @@ store_inferior_registers (regno)
to debugger memory starting at MYADDR. */
void
-read_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
+read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
register int i;
/* Round starting address down to longword boundary. */
@@ -722,10 +704,7 @@ read_inferior_memory (memaddr, myaddr, len)
returns the value of errno. */
int
-write_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
+write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
register int i;
/* Round starting address down to longword boundary. */
@@ -766,7 +745,7 @@ write_inferior_memory (memaddr, myaddr, len)
}
void
-initialize_low ()
+initialize_low (void)
{
initialize_arch ();
}
diff --git a/gdb/gdbserver/low-lynx.c b/gdb/gdbserver/low-lynx.c
index 6669565..d16201e 100644
--- a/gdb/gdbserver/low-lynx.c
+++ b/gdb/gdbserver/low-lynx.c
@@ -53,9 +53,7 @@ char *registers = my_registers;
ALLARGS is a vector of program-name and args. */
int
-create_inferior (program, allargs)
- char *program;
- char **allargs;
+create_inferior (char *program, char **allargs)
{
int pid;
@@ -91,7 +89,7 @@ create_inferior (program, allargs)
/* Kill the inferior process. Make us have no inferior. */
void
-kill_inferior ()
+kill_inferior (void)
{
if (inferior_pid == 0)
return;
@@ -103,8 +101,7 @@ kill_inferior ()
/* Return nonzero if the given thread is still alive. */
int
-mythread_alive (pid)
- int pid;
+mythread_alive (int pid)
{
/* Arggh. Apparently pthread_kill only works for threads within
the process that calls pthread_kill.
@@ -122,8 +119,7 @@ mythread_alive (pid)
/* Wait for process, returns status */
unsigned char
-mywait (status)
- char *status;
+mywait (char *status)
{
int pid;
union wait w;
@@ -186,9 +182,7 @@ mywait (status)
If SIGNAL is nonzero, give it that signal. */
void
-myresume (step, signal)
- int step;
- int signal;
+myresume (int step, int signal)
{
errno = 0;
ptrace (step ? PTRACE_SINGLESTEP_ONE : PTRACE_CONT,
@@ -352,8 +346,7 @@ static int regmap[] =
It also handles knows where to find the I & L regs on the stack. */
void
-fetch_inferior_registers (regno)
- int regno;
+fetch_inferior_registers (int regno)
{
#if 0
int whatregs = 0;
@@ -457,8 +450,7 @@ fetch_inferior_registers (regno)
this point. */
void
-store_inferior_registers (regno)
- int regno;
+store_inferior_registers (int regno)
{
#if 0
int whatregs = 0;
@@ -566,7 +558,7 @@ store_inferior_registers (regno)
saved context block. */
static unsigned long
-lynx_registers_addr ()
+lynx_registers_addr (void)
{
CORE_ADDR stblock;
int ecpoff = offsetof (st_t, ecp);
@@ -591,8 +583,7 @@ lynx_registers_addr ()
marking them as valid so we won't fetch them again. */
void
-fetch_inferior_registers (ignored)
- int ignored;
+fetch_inferior_registers (int ignored)
{
int regno;
unsigned long reg;
@@ -623,8 +614,7 @@ fetch_inferior_registers (ignored)
Otherwise, REGNO specifies which register (so we can save time). */
void
-store_inferior_registers (ignored)
- int ignored;
+store_inferior_registers (int ignored)
{
int regno;
unsigned long reg;
@@ -662,10 +652,7 @@ store_inferior_registers (ignored)
to debugger memory starting at MYADDR. */
void
-read_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
+read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
register int i;
/* Round starting address down to longword boundary. */
@@ -692,10 +679,7 @@ read_inferior_memory (memaddr, myaddr, len)
returns the value of errno. */
int
-write_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
+write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
register int i;
/* Round starting address down to longword boundary. */
@@ -748,6 +732,6 @@ ptrace (PTRACE_POKETEXT): errno=%d, pid=0x%x, addr=0x%x, buffer[i] = 0x%x\n",
}
void
-initialize_low ()
+initialize_low (void)
{
}
diff --git a/gdb/gdbserver/low-nbsd.c b/gdb/gdbserver/low-nbsd.c
index 4aa3409..32bfa78 100644
--- a/gdb/gdbserver/low-nbsd.c
+++ b/gdb/gdbserver/low-nbsd.c
@@ -89,7 +89,7 @@ int i386_register_raw_size[MAX_NUM_REGS] = {
int i386_register_byte[MAX_NUM_REGS];
static void
-initialize_arch()
+initialize_arch (void)
{
/* Initialize the table saying where each register starts in the
register file. */
@@ -108,7 +108,7 @@ initialize_arch()
#ifdef __powerpc__
static void
-initialize_arch()
+initialize_arch (void)
{
}
#endif /* !__powerpc__ */
@@ -119,9 +119,7 @@ initialize_arch()
ENV is the environment vector to pass. */
int
-create_inferior (program, allargs)
- char *program;
- char **allargs;
+create_inferior (char *program, char **allargs)
{
int pid;
@@ -147,7 +145,7 @@ create_inferior (program, allargs)
/* Kill the inferior process. Make us have no inferior. */
void
-kill_inferior ()
+kill_inferior (void)
{
if (inferior_pid == 0)
return;
@@ -158,8 +156,7 @@ kill_inferior ()
/* Return nonzero if the given thread is still alive. */
int
-mythread_alive (pid)
- int pid;
+mythread_alive (int pid)
{
return 1;
}
@@ -167,8 +164,7 @@ mythread_alive (pid)
/* Wait for process, returns status */
unsigned char
-mywait (status)
- char *status;
+mywait (char *status)
{
int pid;
int w;
@@ -201,9 +197,7 @@ mywait (status)
If SIGNAL is nonzero, give it that signal. */
void
-myresume (step, signal)
- int step;
- int signal;
+myresume (int step, int signal)
{
errno = 0;
ptrace (step ? PT_STEP : PT_CONTINUE, inferior_pid,
@@ -219,8 +213,7 @@ myresume (step, signal)
marking them as valid so we won't fetch them again. */
void
-fetch_inferior_registers (ignored)
- int ignored;
+fetch_inferior_registers (int ignored)
{
struct reg inferior_registers;
struct env387 inferior_fp_registers;
@@ -271,8 +264,7 @@ fetch_inferior_registers (ignored)
Otherwise, REGNO specifies which register (so we can save time). */
void
-store_inferior_registers (ignored)
- int ignored;
+store_inferior_registers (int ignored)
{
struct reg inferior_registers;
struct env387 inferior_fp_registers;
@@ -325,8 +317,7 @@ store_inferior_registers (ignored)
marking them as valid so we won't fetch them again. */
void
-fetch_inferior_registers (regno)
- int regno;
+fetch_inferior_registers (int regno)
{
struct reg inferior_registers;
struct fpreg inferior_fp_registers;
@@ -354,8 +345,7 @@ fetch_inferior_registers (regno)
Otherwise, REGNO specifies which register (so we can save time). */
void
-store_inferior_registers (regno)
- int regno;
+store_inferior_registers (int regno)
{
struct reg inferior_registers;
struct fpreg inferior_fp_registers;
@@ -388,10 +378,7 @@ store_inferior_registers (regno)
/* Copy LEN bytes from inferior's memory starting at MEMADDR
to debugger memory starting at MYADDR. */
-read_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
+read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
register int i;
/* Round starting address down to longword boundary. */
@@ -418,10 +405,7 @@ read_inferior_memory (memaddr, myaddr, len)
returns the value of errno. */
int
-write_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
+write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
register int i;
/* Round starting address down to longword boundary. */
@@ -462,7 +446,7 @@ write_inferior_memory (memaddr, myaddr, len)
}
void
-initialize_low ()
+initialize_low (void)
{
initialize_arch ();
}
diff --git a/gdb/gdbserver/low-sim.c b/gdb/gdbserver/low-sim.c
index 8d7c2e6..a0a9aa6 100644
--- a/gdb/gdbserver/low-sim.c
+++ b/gdb/gdbserver/low-sim.c
@@ -41,8 +41,7 @@ static SIM_DESC gdbsim_desc = 0;
does not support loading itself. */
static void
-generic_load (loadfile_bfd)
- bfd *loadfile_bfd;
+generic_load (bfd *loadfile_bfd)
{
asection *s;
@@ -85,9 +84,7 @@ generic_load (loadfile_bfd)
}
int
-create_inferior (program, argv)
- char *program;
- char **argv;
+create_inferior (char *program, char **argv)
{
bfd *abfd;
int pid = 0;
@@ -145,7 +142,7 @@ create_inferior (program, argv)
/* Kill the inferior process. Make us have no inferior. */
void
-kill_inferior ()
+kill_inferior (void)
{
sim_close (gdbsim_desc, 0);
default_callback.shutdown (&default_callback);
@@ -154,8 +151,7 @@ kill_inferior ()
/* Fetch one register. */
static void
-fetch_register (regno)
- int regno;
+fetch_register (int regno)
{
sim_fetch_register (gdbsim_desc, regno, &registers[REGISTER_BYTE (regno)],
REGISTER_RAW_SIZE (regno));
@@ -164,8 +160,7 @@ fetch_register (regno)
/* Fetch all registers, or just one, from the child process. */
void
-fetch_inferior_registers (regno)
- int regno;
+fetch_inferior_registers (int regno)
{
if (regno == -1 || regno == 0)
for (regno = 0; regno < NUM_REGS /*-NUM_FREGS*/ ; regno++)
@@ -179,8 +174,7 @@ fetch_inferior_registers (regno)
Otherwise, REGNO specifies which register (so we can save time). */
void
-store_inferior_registers (regno)
- int regno;
+store_inferior_registers (int regno)
{
if (regno == -1)
{
@@ -194,8 +188,7 @@ store_inferior_registers (regno)
/* Return nonzero if the given thread is still alive. */
int
-mythread_alive (pid)
- int pid;
+mythread_alive (int pid)
{
return 1;
}
@@ -203,8 +196,7 @@ mythread_alive (pid)
/* Wait for process, returns status */
unsigned char
-mywait (status)
- char *status;
+mywait (char *status)
{
int sigrc;
enum sim_stop reason;
@@ -240,9 +232,7 @@ mywait (status)
If SIGNAL is nonzero, give it that signal. */
void
-myresume (step, signo)
- int step;
- int signo;
+myresume (int step, int signo)
{
/* Should be using target_signal_to_host() or signal numbers in target.h
to convert GDB signal number to target signal number. */
@@ -253,10 +243,7 @@ myresume (step, signo)
to debugger memory starting at MYADDR. */
void
-read_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
+read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
sim_read (gdbsim_desc, memaddr, myaddr, len);
}
@@ -267,16 +254,13 @@ read_inferior_memory (memaddr, myaddr, len)
returns the value of errno. */
int
-write_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
+write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
sim_write (gdbsim_desc, memaddr, myaddr, len); /* should check for error. FIXME!! */
return 0;
}
void
-initialize_low ()
+initialize_low (void)
{
}
diff --git a/gdb/gdbserver/low-sparc.c b/gdb/gdbserver/low-sparc.c
index 178afc7..e667c2e 100644
--- a/gdb/gdbserver/low-sparc.c
+++ b/gdb/gdbserver/low-sparc.c
@@ -63,9 +63,7 @@ int query ();
ENV is the environment vector to pass. */
int
-create_inferior (program, allargs)
- char *program;
- char **allargs;
+create_inferior (char *program, char **allargs)
{
int pid;
@@ -91,7 +89,7 @@ create_inferior (program, allargs)
/* Kill the inferior process. Make us have no inferior. */
void
-kill_inferior ()
+kill_inferior (void)
{
if (inferior_pid == 0)
return;
@@ -102,8 +100,7 @@ kill_inferior ()
/* Return nonzero if the given thread is still alive. */
int
-mythread_alive (pid)
- int pid;
+mythread_alive (int pid)
{
return 1;
}
@@ -111,8 +108,7 @@ mythread_alive (pid)
/* Wait for process, returns status */
unsigned char
-mywait (status)
- char *status;
+mywait (char *status)
{
int pid;
union wait w;
@@ -145,9 +141,7 @@ mywait (status)
If SIGNAL is nonzero, give it that signal. */
void
-myresume (step, signal)
- int step;
- int signal;
+myresume (int step, int signal)
{
errno = 0;
ptrace (step ? PTRACE_SINGLESTEP : PTRACE_CONT, inferior_pid, 1, signal);
@@ -160,8 +154,7 @@ myresume (step, signal)
marking them as valid so we won't fetch them again. */
void
-fetch_inferior_registers (ignored)
- int ignored;
+fetch_inferior_registers (int ignored)
{
struct regs inferior_registers;
struct fp_status inferior_fp_registers;
@@ -207,8 +200,7 @@ fetch_inferior_registers (ignored)
Otherwise, REGNO specifies which register (so we can save time). */
void
-store_inferior_registers (ignored)
- int ignored;
+store_inferior_registers (int ignored)
{
struct regs inferior_registers;
struct fp_status inferior_fp_registers;
@@ -250,10 +242,7 @@ store_inferior_registers (ignored)
/* Copy LEN bytes from inferior's memory starting at MEMADDR
to debugger memory starting at MYADDR. */
-read_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
+read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
register int i;
/* Round starting address down to longword boundary. */
@@ -280,10 +269,7 @@ read_inferior_memory (memaddr, myaddr, len)
returns the value of errno. */
int
-write_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
+write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
register int i;
/* Round starting address down to longword boundary. */
@@ -324,6 +310,6 @@ write_inferior_memory (memaddr, myaddr, len)
}
void
-initialize_low ()
+initialize_low (void)
{
}
diff --git a/gdb/gdbserver/low-sun3.c b/gdb/gdbserver/low-sun3.c
index 71a151e..b20c2a8 100644
--- a/gdb/gdbserver/low-sun3.c
+++ b/gdb/gdbserver/low-sun3.c
@@ -60,9 +60,7 @@ int query ();
ENV is the environment vector to pass. */
int
-create_inferior (program, allargs)
- char *program;
- char **allargs;
+create_inferior (char *program, char **allargs)
{
int pid;
@@ -88,7 +86,7 @@ create_inferior (program, allargs)
/* Kill the inferior process. Make us have no inferior. */
void
-kill_inferior ()
+kill_inferior (void)
{
if (inferior_pid == 0)
return;
@@ -99,8 +97,7 @@ kill_inferior ()
/* Return nonzero if the given thread is still alive. */
int
-mythread_alive (pid)
- int pid;
+mythread_alive (int pid)
{
return 1;
}
@@ -108,8 +105,7 @@ mythread_alive (pid)
/* Wait for process, returns status */
unsigned char
-mywait (status)
- char *status;
+mywait (char *status)
{
int pid;
union wait w;
@@ -142,9 +138,7 @@ mywait (status)
If SIGNAL is nonzero, give it that signal. */
void
-myresume (step, signal)
- int step;
- int signal;
+myresume (int step, int signal)
{
errno = 0;
ptrace (step ? PTRACE_SINGLESTEP : PTRACE_CONT, inferior_pid, 1, signal);
@@ -157,8 +151,7 @@ myresume (step, signal)
marking them as valid so we won't fetch them again. */
void
-fetch_inferior_registers (ignored)
- int ignored;
+fetch_inferior_registers (int ignored)
{
struct regs inferior_registers;
struct fp_status inferior_fp_registers;
@@ -190,8 +183,7 @@ fetch_inferior_registers (ignored)
Otherwise, REGNO specifies which register (so we can save time). */
void
-store_inferior_registers (ignored)
- int ignored;
+store_inferior_registers (int ignored)
{
struct regs inferior_registers;
struct fp_status inferior_fp_registers;
@@ -229,10 +221,7 @@ store_inferior_registers (ignored)
/* Copy LEN bytes from inferior's memory starting at MEMADDR
to debugger memory starting at MYADDR. */
-read_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
+read_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
register int i;
/* Round starting address down to longword boundary. */
@@ -259,10 +248,7 @@ read_inferior_memory (memaddr, myaddr, len)
returns the value of errno. */
int
-write_inferior_memory (memaddr, myaddr, len)
- CORE_ADDR memaddr;
- char *myaddr;
- int len;
+write_inferior_memory (CORE_ADDR memaddr, char *myaddr, int len)
{
register int i;
/* Round starting address down to longword boundary. */
@@ -303,6 +289,6 @@ write_inferior_memory (memaddr, myaddr, len)
}
void
-initialize_low ()
+initialize_low (void)
{
}
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index 2b632d6..614466d 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -41,8 +41,7 @@ static int remote_desc;
NAME is the filename used for communication. */
void
-remote_open (name)
- char *name;
+remote_open (char *name)
{
int save_fcntl_flags;
@@ -162,7 +161,7 @@ remote_open (name)
}
void
-remote_close ()
+remote_close (void)
{
close (remote_desc);
}
@@ -170,8 +169,7 @@ remote_close ()
/* Convert hex digit A to a number. */
static int
-fromhex (a)
- int a;
+fromhex (int a)
{
if (a >= '0' && a <= '9')
return a - '0';
@@ -184,8 +182,7 @@ fromhex (a)
/* Convert number NIB to a hex digit. */
static int
-tohex (nib)
- int nib;
+tohex (int nib)
{
if (nib < 10)
return '0' + nib;
@@ -197,8 +194,7 @@ tohex (nib)
The data of the packet is in BUF. Returns >= 0 on success, -1 otherwise. */
int
-putpkt (buf)
- char *buf;
+putpkt (char *buf)
{
int i;
unsigned char csum = 0;
@@ -262,7 +258,7 @@ putpkt (buf)
will cause us to send a SIGINT to the child. */
static void
-input_interrupt ()
+input_interrupt (void)
{
int cc;
char c;
@@ -279,13 +275,13 @@ input_interrupt ()
}
void
-enable_async_io ()
+enable_async_io (void)
{
signal (SIGIO, input_interrupt);
}
void
-disable_async_io ()
+disable_async_io (void)
{
signal (SIGIO, SIG_IGN);
}
@@ -293,7 +289,7 @@ disable_async_io ()
/* Returns next char from remote GDB. -1 if error. */
static int
-readchar ()
+readchar (void)
{
static char buf[BUFSIZ];
static int bufcnt = 0;
@@ -323,8 +319,7 @@ readchar ()
and store it in BUF. Returns length of packet, or negative if error. */
int
-getpkt (buf)
- char *buf;
+getpkt (char *buf)
{
char *bp;
unsigned char csum, c1, c2;
@@ -380,8 +375,7 @@ getpkt (buf)
}
void
-write_ok (buf)
- char *buf;
+write_ok (char *buf)
{
buf[0] = 'O';
buf[1] = 'K';
@@ -389,8 +383,7 @@ write_ok (buf)
}
void
-write_enn (buf)
- char *buf;
+write_enn (char *buf)
{
buf[0] = 'E';
buf[1] = 'N';
@@ -399,9 +392,7 @@ write_enn (buf)
}
void
-convert_int_to_ascii (from, to, n)
- char *from, *to;
- int n;
+convert_int_to_ascii (char *from, char *to, int n)
{
int nib;
char ch;
@@ -418,9 +409,7 @@ convert_int_to_ascii (from, to, n)
void
-convert_ascii_to_int (from, to, n)
- char *from, *to;
- int n;
+convert_ascii_to_int (char *from, char *to, int n)
{
int nib1, nib2;
while (n--)
@@ -432,9 +421,7 @@ convert_ascii_to_int (from, to, n)
}
static char *
-outreg (regno, buf)
- int regno;
- char *buf;
+outreg (int regno, char *buf)
{
int regsize = REGISTER_RAW_SIZE (regno);
@@ -453,10 +440,7 @@ outreg (regno, buf)
}
void
-prepare_resume_reply (buf, status, signo)
- char *buf;
- char status;
- unsigned char signo;
+prepare_resume_reply (char *buf, char status, unsigned char signo)
{
int nib;
@@ -512,10 +496,7 @@ prepare_resume_reply (buf, status, signo)
}
void
-decode_m_packet (from, mem_addr_ptr, len_ptr)
- char *from;
- CORE_ADDR *mem_addr_ptr;
- unsigned int *len_ptr;
+decode_m_packet (char *from, CORE_ADDR *mem_addr_ptr, unsigned int *len_ptr)
{
int i = 0, j = 0;
char ch;
@@ -537,10 +518,8 @@ decode_m_packet (from, mem_addr_ptr, len_ptr)
}
void
-decode_M_packet (from, mem_addr_ptr, len_ptr, to)
- char *from, *to;
- CORE_ADDR *mem_addr_ptr;
- unsigned int *len_ptr;
+decode_M_packet (char *from, CORE_ADDR *mem_addr_ptr, unsigned int *len_ptr,
+ char *to)
{
int i = 0;
char ch;
diff --git a/gdb/gdbserver/utils.c b/gdb/gdbserver/utils.c
index 2603beb..2ad49e3 100644
--- a/gdb/gdbserver/utils.c
+++ b/gdb/gdbserver/utils.c
@@ -29,8 +29,7 @@
Then return to command level. */
void
-perror_with_name (string)
- char *string;
+perror_with_name (char *string)
{
#ifndef STDC_HEADERS
extern int sys_nerr;