* 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.*).
This commit is contained in:
John Gilmore 1992-09-02 08:51:17 +00:00
parent e1313d24bc
commit b52373a2b1
7 changed files with 121 additions and 98 deletions

View file

@ -1,3 +1,19 @@
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) Wed Sep 2 00:10:43 1992 John Gilmore (gnu@cygnus.com)
* configure.in (*-*-sunos*): Use trailing * to match all * configure.in (*-*-sunos*): Use trailing * to match all
@ -3288,7 +3304,7 @@ Fri Feb 21 17:29:54 1992 Fred Fish (fnf at cygnus.com)
to minimal symbol table use. to minimal symbol table use.
* printcmd.c (delete_display, enable_display, disable_display_command): * printcmd.c (delete_display, enable_display, disable_display_command):
Make static. 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. * procfs.c (fetch_core_registers): Add unused param reg_addr.
* pyr-xdep.c (fetch_inferior_registers): Add unused param regno. * pyr-xdep.c (fetch_inferior_registers): Add unused param regno.
* pyr-xdep.c (store_inferior_registers): Returns void. * pyr-xdep.c (store_inferior_registers): Returns void.
@ -3303,7 +3319,7 @@ Fri Feb 21 17:29:54 1992 Fred Fish (fnf at cygnus.com)
* solib.c: Add prototypes for local functions. * solib.c: Add prototypes for local functions.
* solib.c (solib_add_common_symbols, locate_base): Convert from misc * solib.c (solib_add_common_symbols, locate_base): Convert from misc
function vector use to minimal symbol table use. 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 (find_solib, shared_library_command): Make static
* solib.c (read_memory, write_memory usages): Cast args. * solib.c (read_memory, write_memory usages): Cast args.
* solib.c (special_symbol_handling): Add function * solib.c (special_symbol_handling): Add function

View file

@ -54,7 +54,7 @@ m68k-sony-*) gdb_host=news ;;
m68k-sun-sunos3*) gdb_host=sun3os3 ;; m68k-sun-sunos3*) gdb_host=sun3os3 ;;
m68k-sun-sunos4*) gdb_host=sun3os4 ;; m68k-sun-sunos4*) gdb_host=sun3os4 ;;
m68k-sun-*) gdb_host=sun3 ;; m68k-sun-*) gdb_host=sun3os4 ;;
m88k-motorola-*) gdb_host=delta88 ;; m88k-motorola-*) gdb_host=delta88 ;;
m88k-*-*) gdb_host=m88k ;; m88k-*-*) gdb_host=m88k ;;
@ -82,7 +82,7 @@ rs6000-*-*) gdb_host=rs6000 ;;
sparc-*-solaris2*) gdb_host=sun4sol2 ;; sparc-*-solaris2*) gdb_host=sun4sol2 ;;
sparc-*-sunos4*) gdb_host=sun4os4 ;; sparc-*-sunos4*) gdb_host=sun4os4 ;;
sparc-*-*) gdb_host=sun4 ;; sparc-*-*) gdb_host=sun4os4 ;;
tahoe-*-*) gdb_host=tahoe ;; tahoe-*-*) gdb_host=tahoe ;;
@ -169,7 +169,6 @@ m68k-isi-*) gdb_target=isi ;;
m68k-netx-*) gdb_target=vxworks68 ;; m68k-netx-*) gdb_target=vxworks68 ;;
m68k-sony-*) gdb_target=news ;; m68k-sony-*) gdb_target=news ;;
m68k-sun-*) gdb_target=sun3 ;;
m68k-*-aout) gdb_target=m68k-un ;; m68k-*-aout) gdb_target=m68k-un ;;
m68k-*-coff) gdb_target=m68k-noun ;; m68k-*-coff) gdb_target=m68k-noun ;;
@ -212,7 +211,7 @@ sparc-*-elf) gdb_target=sparc-noun ;;
sparc-*-solaris2*) gdb_target=sun4sol2 ;; sparc-*-solaris2*) gdb_target=sun4sol2 ;;
sparc-*-sunos4*) gdb_target=sun4os4 ;; sparc-*-sunos4*) gdb_target=sun4os4 ;;
sparc-*-vxworks*) gdb_target=sparc-un ;; sparc-*-vxworks*) gdb_target=sparc-un ;;
sparc-*-*) gdb_target=sun4 ;; sparc-*-*) gdb_target=sun4os4 ;;
tahoe-*-*) gdb_target=tahoe ;; tahoe-*-*) gdb_target=tahoe ;;
vax-*-*) gdb_target=vax ;; vax-*-*) gdb_target=vax ;;

View file

@ -328,7 +328,7 @@ mem( memaddr, word1, word2, noprint )
int len; int len;
int mode; int mode;
int offset; 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 /* 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 * so large as to make a sparse array necessary. We allocate the

View file

@ -235,7 +235,7 @@ dcache_init ()
static int timeout = 2; 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 /* Descriptor for I/O to remote machine. Initialize it to -1 so that

View file

@ -1,4 +1,4 @@
/* Remote serial interface for GO32 /* Remote serial interface for GO32, for GDB, the GNU Debugger.
Copyright 1992 Free Software Foundation, Inc. Copyright 1992 Free Software Foundation, Inc.
This file is part of GDB. This file is part of GDB.
@ -17,6 +17,9 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 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 "defs.h"
#include "serial.h" #include "serial.h"
@ -57,13 +60,17 @@ static int iov;
#define com_lsr iov+5 #define com_lsr iov+5
#define com_msr iov+6 #define com_msr iov+6
static int fd;
#if MONO #if MONO
#include <sys/pc.h> #include <sys/pc.h>
static int mono_pos=0; static int mono_pos=0;
#define mono_rx 0x07 #define mono_rx 0x07
#define mono_tx 0x70 #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+80] = 0x0720;
ScreenSecondary[320+mono_pos] = (attr<<8) | (byte&0xff); ScreenSecondary[320+mono_pos] = (attr<<8) | (byte&0xff);
@ -72,7 +79,8 @@ void mono_put(char byte, char attr)
#endif #endif
static char far *aptr(short p) static char far *
aptr(short p)
{ {
#ifdef __GNUC__ #ifdef __GNUC__
return (char *)((unsigned)async - OFFSET + p); return (char *)((unsigned)async - OFFSET + p);
@ -81,7 +89,8 @@ static char far *aptr(short p)
#endif #endif
} }
static ASYNC_STRUCT far *getivec(int which) static ASYNC_STRUCT far *
getivec(int which)
{ {
ASYNC_STRUCT far *a; ASYNC_STRUCT far *a;
@ -100,7 +109,8 @@ static ASYNC_STRUCT far *getivec(int which)
return a; return a;
} }
int dos_async_init() int
dos_async_init()
{ {
int i; int i;
ASYNC_STRUCT far *a1; ASYNC_STRUCT far *a1;
@ -145,6 +155,7 @@ C> gdb \n");
return 2; return 2;
} }
void
dos_async_tx(char c) dos_async_tx(char c)
{ {
dprintf("dos_async_tx: enter %x - with IOV %x", c, com_lsr); dprintf("dos_async_tx: enter %x - with IOV %x", c, com_lsr);
@ -157,12 +168,14 @@ dos_async_tx(char c)
dprintf("exit\n"); dprintf("exit\n");
} }
int dos_async_ready() int
dos_async_ready()
{ {
return (async->getp != async->putp); return (async->getp != async->putp);
} }
int dos_async_rx() int
dos_async_rx()
{ {
char rv; char rv;
dprintf("dos_async_rx: enter - "); dprintf("dos_async_rx: enter - ");
@ -185,12 +198,14 @@ int dos_async_rx()
return rv; return rv;
} }
int dos_kb_ready() int
dos_kb_ready()
{ {
return (peek(0x40,0x1a) != peek(0x40,0x1c)); return (peek(0x40,0x1a) != peek(0x40,0x1c));
} }
int dos_kb_rx() int
dos_kb_rx()
{ {
#ifdef __GNUC__ #ifdef __GNUC__
return getkey(); return getkey();
@ -199,7 +214,8 @@ int dos_kb_rx()
#endif #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; long now, then;
int l = length; int l = length;
@ -226,7 +242,8 @@ int dosasync_read(int fd, char *buffer, int length, int timeout)
return 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; int l = length;
while (l--) while (l--)
@ -236,7 +253,8 @@ int dosasync_write(int fd, CONST char *buffer, int length)
char *strlwr(char *s) char *
strlwr(char *s)
{ {
char *p = s; char *p = s;
while (*s) while (*s)
@ -248,30 +266,27 @@ char *strlwr(char *s)
return p; return p;
} }
sigsetmask() { sigsetmask()
{
} }
const char *
serial_default_name ()
static int fd;
CONST char *
DEFUN_VOID(serial_default_name)
{ {
return "com1"; return "com1";
} }
void void
DEFUN_VOID(serial_raw) serial_raw ()
{ {
/* Always in raw mode */ /* Always in raw mode */
} }
int int
DEFUN(serial_open,(name), serial_open (name)
CONST char *name) const char *name;
{ {
fd = dos_async_init(); fd = dos_async_init();
if (fd) return 1; if (fd) return 1;
@ -279,9 +294,9 @@ DEFUN(serial_open,(name),
} }
int int
DEFUN(serial_timedreadchar,(to, ok), serial_timedreadchar (to, ok)
int to AND int to;
int *ok) int *ok;
{ {
char buf; char buf;
if (dosasync_read(fd, &buf, 1, to)) if (dosasync_read(fd, &buf, 1, to))
@ -296,31 +311,28 @@ DEFUN(serial_timedreadchar,(to, ok),
} }
int int
DEFUN(serial_setbaudrate,(rate), serial_setbaudrate (rate)
int rate) int rate;
{ {
return 0; return 0;
} }
int int
DEFUN(serial_nextbaudrate,(rate), serial_nextbaudrate (rate)
int rate) int rate;
{ {
return 0; return 0;
} }
int int
DEFUN(serial_write,(str, len), serial_write (str, len)
CONST char *str AND const char *str;
int len) int len;
{ {
dosasync_write(fd, str, len); dosasync_write(fd, str, len);
} }
int int
DEFUN_VOID(serial_close) serial_close ()
{ {
} }

View file

@ -1,7 +1,5 @@
/* Remote serial interface for OS's with termios /* Remote serial interface for OS's with termios, for GDB.
Copyright 1992 Free Software Foundation, Inc.
Copyright 1992
Free Software Foundation, Inc.
This file is part of GDB. This file is part of GDB.
@ -25,26 +23,27 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <termios.h> #include <termios.h>
#include <sys/time.h> #include <sys/time.h>
/* File descriptor used in termios routines to access serial line. */
static int desc; static int desc;
/* Saved state about the terminal. */
static struct termios otermios;
static int oflags;
CONST char * const char *
DEFUN_VOID(serial_default_name) serial_default_name ()
{ {
return "/dev/ttya"; return "/dev/ttya";
} }
void void
DEFUN_VOID(serial_raw) serial_raw ()
{ {
/* Now happens inside of serial_open */ /* Now happens inside of serial_open */
} }
static struct termios otermios;
static int oflags;
void void
DEFUN_VOID(serial_normal) serial_normal ()
{ {
fcntl(desc, oflags, 0); fcntl(desc, oflags, 0);
@ -55,8 +54,8 @@ DEFUN_VOID(serial_normal)
} }
int int
DEFUN(serial_open,(name), serial_open (name)
CONST char *name) const char *name;
{ {
struct termios termios; struct termios termios;
@ -88,9 +87,9 @@ DEFUN(serial_open,(name),
} }
int int
DEFUN(serial_timedreadchar,(timeout, ok), serial_timedreadchar (timeout, ok)
int timeout AND int timeout;
int *ok) int *ok;
{ {
unsigned char buf; unsigned char buf;
fd_set readfds; fd_set readfds;
@ -135,6 +134,7 @@ static struct {int rate, damn_b;} baudtab[] = {
{9600, B9600}, {9600, B9600},
{19200, B19200}, {19200, B19200},
{38400, B38400},
#if 0 #if 0
{300, B300}, {300, B300},
{1200, B1200}, {1200, B1200},
@ -145,8 +145,8 @@ static struct {int rate, damn_b;} baudtab[] = {
}; };
static int static int
DEFUN(damn_b,(rate), damn_b (rate)
int rate) int rate;
{ {
int i; int i;
for (i = 0; baudtab[i].rate != -1; i++) for (i = 0; baudtab[i].rate != -1; i++)
@ -160,7 +160,8 @@ DEFUN(damn_b,(rate),
} }
int int
DEFUN(serial_setbaudrate,(rate),int rate) serial_setbaudrate (rate)
int rate;
{ {
struct termios termios; struct termios termios;
@ -179,8 +180,8 @@ DEFUN(serial_setbaudrate,(rate),int rate)
} }
int int
DEFUN(serial_nextbaudrate,(rate), serial_nextbaudrate (rate)
int rate) int rate;
{ {
int lookup; int lookup;
lookup = damn_b(rate); lookup = damn_b(rate);
@ -193,16 +194,16 @@ DEFUN(serial_nextbaudrate,(rate),
} }
int int
DEFUN(serial_write,(str, len), serial_write (str, len)
CONST char *str AND const char *str;
int len) int len;
{ {
return (write (desc, str, len)); return (write (desc, str, len));
} }
int int
DEFUN_VOID(serial_close) serial_close ()
{ {
return (close(desc)); return (close(desc));
} }

View file

@ -1,4 +1,4 @@
/* 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. Copyright 1992 Free Software Foundation, Inc.
This file is part of GDB. This file is part of GDB.
@ -18,45 +18,40 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Return a sensible default name for a serial device, something which /* 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 the baudrate to the decimal value supplied, and return 1, or fail and
set ok if ok */ 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 int serial_nextbaudrate PARAMS ((int rate));
return 0 */
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. */
int serial_close PARAMS ((void));
/* 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));