summaryrefslogtreecommitdiff
path: root/gdb/nlm
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
commitfeb494d76a34e3ccf614ceccd68d6ce7b2f1cbd8 (patch)
treecfa1634e210020e9a0afea2b92c02c6afb77049f /gdb/nlm
parent6d631e9666c66111eadeebf8a41348817e73a590 (diff)
downloadgdb-feb494d76a34e3ccf614ceccd68d6ce7b2f1cbd8.tar.gz
Diffstat (limited to 'gdb/nlm')
-rw-r--r--gdb/nlm/gdbserve.c51
-rw-r--r--gdb/nlm/i386.c20
-rw-r--r--gdb/nlm/ppc.c29
3 files changed, 28 insertions, 72 deletions
diff --git a/gdb/nlm/gdbserve.c b/gdb/nlm/gdbserve.c
index 62adf3a8d1b..990a3f9ebd4 100644
--- a/gdb/nlm/gdbserve.c
+++ b/gdb/nlm/gdbserve.c
@@ -166,7 +166,7 @@ static int __main() {};
that's OK because we will be the only thread running anyhow. */
static int
-getDebugChar ()
+getDebugChar (void)
{
int err;
LONG got;
@@ -191,8 +191,7 @@ getDebugChar ()
non-zero on success. */
static int
-putDebugChar (c)
- unsigned char c;
+putDebugChar (unsigned char c)
{
int err;
LONG put;
@@ -210,8 +209,7 @@ putDebugChar (c)
/* Turn a hex character into a number. */
static int
-hex (ch)
- char ch;
+hex (char ch)
{
if ((ch >= 'a') && (ch <= 'f'))
return (ch-'a'+10);
@@ -226,8 +224,7 @@ hex (ch)
non-zero on success. */
static int
-getpacket (buffer)
- char * buffer;
+getpacket (char *buffer)
{
unsigned char checksum;
unsigned char xmitcsum;
@@ -312,8 +309,7 @@ getpacket (buffer)
success. */
static int
-putpacket (buffer)
- char * buffer;
+putpacket (char *buffer)
{
unsigned char checksum;
int count;
@@ -357,9 +353,7 @@ static char remcomOutBuffer[BUFMAX];
static short error;
static void
-debug_error (format, parm)
- char *format;
- char *parm;
+debug_error (char *format, char *parm)
{
if (remote_debug)
{
@@ -382,16 +376,13 @@ volatile int mem_err = 0;
saved). */
int
-get_char (addr)
- char *addr;
+get_char (char *addr)
{
return *addr;
}
void
-set_char (addr, val)
- char *addr;
- int val;
+set_char (char *addr, int val)
{
*addr = val;
}
@@ -403,11 +394,7 @@ set_char (addr, val)
a fault; if zero treat a fault like any other fault in the stub. */
char *
-mem2hex (mem, buf, count, may_fault)
- void *mem;
- char *buf;
- int count;
- int may_fault;
+mem2hex (void *mem, char *buf, int count, int may_fault)
{
int i;
unsigned char ch;
@@ -431,11 +418,7 @@ mem2hex (mem, buf, count, may_fault)
/* return a pointer to the character AFTER the last byte written */
char *
-hex2mem (buf, mem, count, may_fault)
- char *buf;
- void *mem;
- int count;
- int may_fault;
+hex2mem (char *buf, void *mem, int count, int may_fault)
{
int i;
unsigned char ch;
@@ -458,8 +441,7 @@ hex2mem (buf, mem, count, may_fault)
translate this number into a unix compatible signal value. */
int
-computeSignal (exceptionVector)
- int exceptionVector;
+computeSignal (int exceptionVector)
{
int sigval;
switch (exceptionVector)
@@ -490,9 +472,7 @@ computeSignal (exceptionVector)
/* RETURN NUMBER OF CHARS PROCESSED */
/**********************************************/
static int
-hexToInt(ptr, intValue)
- char **ptr;
- int *intValue;
+hexToInt (char **ptr, int *intValue)
{
int numChars = 0;
int hexValue;
@@ -521,8 +501,7 @@ hexToInt(ptr, intValue)
debugged. */
static LONG
-handle_exception (frame)
- struct StackFrame *frame;
+handle_exception (struct StackFrame *frame)
{
int addr, length;
char *ptr;
@@ -810,9 +789,7 @@ char parity[] = "NOEMS";
to have to figure out how to do that. */
int
-main (argc, argv)
- int argc;
- char **argv;
+main (int argc, char **argv)
{
int hardware, board, port;
BYTE bitRate;
diff --git a/gdb/nlm/i386.c b/gdb/nlm/i386.c
index 560198e3702..b8ab480b996 100644
--- a/gdb/nlm/i386.c
+++ b/gdb/nlm/i386.c
@@ -16,16 +16,14 @@ extern char *hex2mem (char *buf, void *mem, int count, int may_fault);
extern int computeSignal (int exceptionVector);
void
-flush_i_cache()
+flush_i_cache (void)
{
}
/* Get the registers out of the frame information. */
void
-frame_to_registers (frame, regs)
- struct StackFrame *frame;
- char *regs;
+frame_to_registers (struct StackFrame *frame, char *regs)
{
/* Copy EAX -> EDI */
mem2hex (&frame->ExceptionEAX, &regs[0 * 4 * 2], 4 * 8, 0);
@@ -46,9 +44,7 @@ frame_to_registers (frame, regs)
/* Put the registers back into the frame information. */
void
-registers_to_frame (regs, frame)
- char *regs;
- struct StackFrame *frame;
+registers_to_frame (char *regs, struct StackFrame *frame)
{
/* Copy EAX -> EDI */
hex2mem (&regs[0 * 4 * 2], &frame->ExceptionEAX, 4 * 8, 0);
@@ -67,23 +63,19 @@ registers_to_frame (regs, frame)
}
void
-set_step_traps (frame)
- struct StackFrame *frame;
+set_step_traps (struct StackFrame *frame)
{
frame->ExceptionSystemFlags |= 0x100;
}
void
-clear_step_traps (frame)
- struct StackFrame *frame;
+clear_step_traps (struct StackFrame *frame)
{
frame->ExceptionSystemFlags &= ~0x100;
}
void
-do_status (ptr, frame)
- char *ptr;
- struct StackFrame *frame;
+do_status (char *ptr, struct StackFrame *frame)
{
int sigval;
diff --git a/gdb/nlm/ppc.c b/gdb/nlm/ppc.c
index e68397bc96b..c5850abcd77 100644
--- a/gdb/nlm/ppc.c
+++ b/gdb/nlm/ppc.c
@@ -24,9 +24,7 @@ flush_i_cache (void)
/* Get the registers out of the frame information. */
void
-frame_to_registers (frame, regs)
- struct StackFrame *frame;
- char *regs;
+frame_to_registers (struct StackFrame *frame, char *regs)
{
mem2hex (&frame->ExceptionState.CsavedRegs, &regs[GP0_REGNUM * 4 * 2], 4 * 32, 0);
@@ -44,9 +42,7 @@ frame_to_registers (frame, regs)
/* Put the registers back into the frame information. */
void
-registers_to_frame (regs, frame)
- char *regs;
- struct StackFrame *frame;
+registers_to_frame (char *regs, struct StackFrame *frame)
{
hex2mem (&regs[GP0_REGNUM * 4 * 2], &frame->ExceptionState.CsavedRegs, 4 * 32, 0);
@@ -68,8 +64,7 @@ extern volatile int mem_err;
extern int ReadByteAltDebugger (char* addr, char *theByte);
extern int WriteByteAltDebugger (char* addr, char theByte);
int
-get_char (addr)
- char *addr;
+get_char (char *addr)
{
char c;
@@ -80,9 +75,7 @@ get_char (addr)
}
void
-set_char (addr, val)
- char *addr;
- int val;
+set_char (char *addr, int val)
{
if (!WriteByteAltDebugger (addr, val))
mem_err = 1;
@@ -90,9 +83,7 @@ set_char (addr, val)
#endif
int
-mem_write (dst, src, len)
- char *dst, *src;
- int len;
+mem_write (char *dst, char *src, int len)
{
while (len-- && !mem_err)
set_char (dst++, *src++);
@@ -142,8 +133,7 @@ static LONG saved_target_inst;
static LONG *saved_target_inst_pc = 0;
void
-set_step_traps (frame)
- struct StackFrame *frame;
+set_step_traps (struct StackFrame *frame)
{
union inst inst;
LONG *target;
@@ -203,8 +193,7 @@ set_step_traps (frame)
set. */
int
-clear_step_traps (frame)
- struct StackFrame *frame;
+clear_step_traps (struct StackFrame *frame)
{
int retcode;
LONG *pc = (LONG *)frame->ExceptionPC;
@@ -230,9 +219,7 @@ clear_step_traps (frame)
}
void
-do_status (ptr, frame)
- char *ptr;
- struct StackFrame *frame;
+do_status (char *ptr, struct StackFrame *frame)
{
int sigval;