* serial.h (EXFUN): Remove all uses, convert to PARAMS.
* config/sun4os4.mh: Include ser-termios.o. FIXME, all .mh files
should include a ser-XXX.o module.
* dbxread.c (elfstab_build_psymtabs): Remove DEFUN crap.
* defs.h, i960-pinsn.c, remote-hms.c: Replace CONST with simple const.
* configure.in: Map unrecognized sun 68k's, sun sparcs, into
known suns in configure.in, rather than mapping them to unique
config files that happen to duplicate other config files.
* config/sun3.{mh,mt}: Remove (use identical sun3os4.*).
* config/sun4.{mh,mt}: Remove (use identical sun4os4.*).
+Wed Sep 2 01:18:31 1992 John Gilmore (gnu@cygnus.com)
+
+ * ser-termios.c, ser-go32.c: Remove DEFUN crap, clean up.
+ * serial.h (EXFUN): Remove all uses, convert to PARAMS.
+ * config/sun4os4.mh: Include ser-termios.o. FIXME, all .mh files
+ should include a ser-XXX.o module.
+
+ * dbxread.c (elfstab_build_psymtabs): Remove DEFUN crap.
+ * defs.h, i960-pinsn.c, remote-hms.c: Replace CONST with simple const.
+
+ * configure.in: Map unrecognized sun 68k's, sun sparcs, into
+ known suns in configure.in, rather than mapping them to unique
+ config files that happen to duplicate other config files.
+ * config/sun3.{mh,mt}: Remove (use identical sun3os4.*).
+ * config/sun4.{mh,mt}: Remove (use identical sun4os4.*).
+
Wed Sep 2 00:10:43 1992 John Gilmore (gnu@cygnus.com)
* configure.in (*-*-sunos*): Use trailing * to match all
to minimal symbol table use.
* printcmd.c (delete_display, enable_display, disable_display_command):
Make static.
- * procfs.c (EXFUN/DEFUN): Remove all usages, convert to PARAM.
+ * procfs.c (EXFUN/DEFUN): Remove all usages, convert to PARAMS.
* procfs.c (fetch_core_registers): Add unused param reg_addr.
* pyr-xdep.c (fetch_inferior_registers): Add unused param regno.
* pyr-xdep.c (store_inferior_registers): Returns void.
* solib.c: Add prototypes for local functions.
* solib.c (solib_add_common_symbols, locate_base): Convert from misc
function vector use to minimal symbol table use.
- * solib.c (EXFUN/DEFUN): Remove all usages, convert to PARAM.
+ * solib.c (EXFUN/DEFUN): Remove all usages, convert to PARAMS.
* solib.c (find_solib, shared_library_command): Make static
* solib.c (read_memory, write_memory usages): Cast args.
* solib.c (special_symbol_handling): Add function
m68k-sun-sunos3*) gdb_host=sun3os3 ;;
m68k-sun-sunos4*) gdb_host=sun3os4 ;;
-m68k-sun-*) gdb_host=sun3 ;;
+m68k-sun-*) gdb_host=sun3os4 ;;
m88k-motorola-*) gdb_host=delta88 ;;
m88k-*-*) gdb_host=m88k ;;
sparc-*-solaris2*) gdb_host=sun4sol2 ;;
sparc-*-sunos4*) gdb_host=sun4os4 ;;
-sparc-*-*) gdb_host=sun4 ;;
+sparc-*-*) gdb_host=sun4os4 ;;
tahoe-*-*) gdb_host=tahoe ;;
m68k-netx-*) gdb_target=vxworks68 ;;
m68k-sony-*) gdb_target=news ;;
-m68k-sun-*) gdb_target=sun3 ;;
m68k-*-aout) gdb_target=m68k-un ;;
m68k-*-coff) gdb_target=m68k-noun ;;
sparc-*-solaris2*) gdb_target=sun4sol2 ;;
sparc-*-sunos4*) gdb_target=sun4os4 ;;
sparc-*-vxworks*) gdb_target=sparc-un ;;
-sparc-*-*) gdb_target=sun4 ;;
+sparc-*-*) gdb_target=sun4os4 ;;
tahoe-*-*) gdb_target=tahoe ;;
vax-*-*) gdb_target=vax ;;
int len;
int mode;
int offset;
- CONST char *reg1, *reg2, *reg3;
+ const char *reg1, *reg2, *reg3;
/* This lookup table is too sparse to make it worth typing in, but not
* so large as to make a sparse array necessary. We allocate the
static int timeout = 2;
-static CONST char *dev_name;
+static const char *dev_name;
/* Descriptor for I/O to remote machine. Initialize it to -1 so that
-/* Remote serial interface for GO32
+/* Remote serial interface for GO32, for GDB, the GNU Debugger.
Copyright 1992 Free Software Foundation, Inc.
This file is part of GDB.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+/* This file shows most of the obvious problems of code written for
+ the IBM PC. FIXME. -- gnu@cygnus.com, Sep92 */
+
#include "defs.h"
#include "serial.h"
#define com_lsr iov+5
#define com_msr iov+6
+static int fd;
+
+
#if MONO
#include <sys/pc.h>
static int mono_pos=0;
#define mono_rx 0x07
#define mono_tx 0x70
-void mono_put(char byte, char attr)
+void
+mono_put(char byte, char attr)
{
ScreenSecondary[320+mono_pos+80] = 0x0720;
ScreenSecondary[320+mono_pos] = (attr<<8) | (byte&0xff);
#endif
-static char far *aptr(short p)
+static char far *
+aptr(short p)
{
#ifdef __GNUC__
return (char *)((unsigned)async - OFFSET + p);
#endif
}
-static ASYNC_STRUCT far *getivec(int which)
+static ASYNC_STRUCT far *
+getivec(int which)
{
ASYNC_STRUCT far *a;
return a;
}
-int dos_async_init()
+int
+dos_async_init()
{
int i;
ASYNC_STRUCT far *a1;
return 2;
}
+void
dos_async_tx(char c)
{
dprintf("dos_async_tx: enter %x - with IOV %x", c, com_lsr);
dprintf("exit\n");
}
-int dos_async_ready()
+int
+dos_async_ready()
{
return (async->getp != async->putp);
}
-int dos_async_rx()
+int
+dos_async_rx()
{
char rv;
dprintf("dos_async_rx: enter - ");
return rv;
}
-int dos_kb_ready()
+int
+dos_kb_ready()
{
return (peek(0x40,0x1a) != peek(0x40,0x1c));
}
-int dos_kb_rx()
+int
+dos_kb_rx()
{
#ifdef __GNUC__
return getkey();
#endif
}
-int dosasync_read(int fd, char *buffer, int length, int timeout)
+int
+dosasync_read (int fd, char *buffer, int length, int timeout)
{
long now, then;
int l = length;
return length;
}
-int dosasync_write(int fd, CONST char *buffer, int length)
+int
+dosasync_write(int fd, const char *buffer, int length)
{
int l = length;
while (l--)
-char *strlwr(char *s)
+char *
+strlwr(char *s)
{
char *p = s;
while (*s)
return p;
}
-sigsetmask() {
+sigsetmask()
+{
}
-
-
-
-static int fd;
-
-CONST char *
-DEFUN_VOID(serial_default_name)
+\f
+const char *
+serial_default_name ()
{
return "com1";
}
void
-DEFUN_VOID(serial_raw)
+serial_raw ()
{
-/* Always in raw mode */
+ /* Always in raw mode */
}
int
-DEFUN(serial_open,(name),
- CONST char *name)
+serial_open (name)
+ const char *name;
{
fd = dos_async_init();
if (fd) return 1;
}
int
-DEFUN(serial_timedreadchar,(to, ok),
- int to AND
- int *ok)
+serial_timedreadchar (to, ok)
+ int to;
+ int *ok;
{
char buf;
- if ( dosasync_read(fd, &buf, 1, to))
+ if (dosasync_read(fd, &buf, 1, to))
{
*ok = 1;
}
}
int
-DEFUN(serial_setbaudrate,(rate),
- int rate)
+serial_setbaudrate (rate)
+ int rate;
{
return 0;
}
int
-DEFUN(serial_nextbaudrate,(rate),
- int rate)
+serial_nextbaudrate (rate)
+ int rate;
{
return 0;
}
int
-DEFUN(serial_write,(str, len),
- CONST char *str AND
- int len)
+serial_write (str, len)
+ const char *str;
+ int len;
{
dosasync_write(fd, str, len);
}
int
-DEFUN_VOID(serial_close)
+serial_close ()
{
-
-
}
-
-/* Remote serial interface for OS's with termios
-
- Copyright 1992
- Free Software Foundation, Inc.
+/* Remote serial interface for OS's with termios, for GDB.
+ Copyright 1992 Free Software Foundation, Inc.
This file is part of GDB.
#include <termios.h>
#include <sys/time.h>
+/* File descriptor used in termios routines to access serial line. */
static int desc;
+/* Saved state about the terminal. */
+static struct termios otermios;
+static int oflags;
-CONST char *
-DEFUN_VOID(serial_default_name)
+const char *
+serial_default_name ()
{
return "/dev/ttya";
}
void
-DEFUN_VOID(serial_raw)
+serial_raw ()
{
/* Now happens inside of serial_open */
}
-static struct termios otermios;
-static int oflags;
-
void
-DEFUN_VOID(serial_normal)
+serial_normal ()
{
fcntl(desc, oflags, 0);
}
int
-DEFUN(serial_open,(name),
- CONST char *name)
+serial_open (name)
+ const char *name;
{
struct termios termios;
}
int
-DEFUN(serial_timedreadchar,(timeout, ok),
- int timeout AND
- int *ok)
+serial_timedreadchar (timeout, ok)
+ int timeout;
+ int *ok;
{
unsigned char buf;
fd_set readfds;
{9600, B9600},
{19200, B19200},
+ {38400, B38400},
#if 0
{300, B300},
{1200, B1200},
};
static int
-DEFUN(damn_b,(rate),
- int rate)
+damn_b (rate)
+ int rate;
{
int i;
for (i = 0; baudtab[i].rate != -1; i++)
}
int
-DEFUN(serial_setbaudrate,(rate),int rate)
+serial_setbaudrate (rate)
+ int rate;
{
struct termios termios;
}
int
-DEFUN(serial_nextbaudrate,(rate),
- int rate)
+serial_nextbaudrate (rate)
+ int rate;
{
int lookup;
lookup = damn_b(rate);
}
int
-DEFUN(serial_write,(str, len),
- CONST char *str AND
- int len)
+serial_write (str, len)
+ const char *str;
+ int len;
{
return (write (desc, str, len));
}
int
-DEFUN_VOID(serial_close)
+serial_close ()
{
return (close(desc));
}
-/* Remote Serial support interface definitions for GDB, the GNU Debugger.
+/* Remote serial support interface definitions for GDB, the GNU Debugger.
Copyright 1992 Free Software Foundation, Inc.
This file is part of GDB.
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Return a sensible default name for a serial device, something which
- can be used as an argument to serial_open */
+ can be used as an argument to serial_open. */
-CONST char *EXFUN(serial_default_name,(void));
+const char *serial_default_name PARAMS ((void));
-/* Try to open the serial device "name", return 1 if ok, 0 if not. */
+/* Try to open the serial device "name", return 1 if ok, 0 if not. */
-int EXFUN(serial_open,(CONST char *name));
+int serial_open PARAMS ((const char *name));
-/* Turn the port into raw mode */
+/* Turn the port into raw mode. */
-void EXFUN(serial_raw,(void));
+void serial_raw PARAMS ((void));
+/* Turn the port into normal mode. */
-/* Turn the port into normal mode */
+void serial_normal PARAMS ((void));
-void EXFUN(serial_normal,(void));
+/* Read one char from the serial device with <TO>-second timeout.
+ Return char, and set ok if ok. */
+int serial_timedreadchar PARAMS ((int to, int *ok));
-/* Read one char from the serial device with timeout, return char, and
- set ok if ok */
+/* Set the baudrate to the decimal value supplied, and return 1, or fail and
+ return 0. */
-int EXFUN(serial_timedreadchar,(int to , int *ok));
+int serial_setbaudrate PARAMS ((int to));
+/* Return the next rate in the sequence, or return 0 for failure. */
-/* Set the baudrate to the value supplied, and return 1, or fail and
- return 0 */
+int serial_nextbaudrate PARAMS ((int rate));
-int EXFUN(serial_setbaudrate,(int to));
+/* Write some chars to the device, return 1 if ok, 0 if not. */
-/* Return the next rate in the sequence, or return 0 for a fail*/
+int serial_write PARAMS ((const char *str, int len));
-int EXFUN(serial_nextbaudrate,(int rate));
+/* Close the serial port. */
-
-/* Write some chars to the device, return 1 if ok, 0 if not */
-
-int EXFUN(serial_write,( CONST char *str , int len));
-
-
-/* Close the serial port */
-
-int EXFUN(serial_close,(void));
+int serial_close PARAMS ((void));