aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog20
-rw-r--r--gdb/configure.in7
-rw-r--r--gdb/i960-pinsn.c2
-rw-r--r--gdb/remote-hms.c2
-rw-r--r--gdb/ser-go32.c90
-rw-r--r--gdb/ser-termios.c51
-rw-r--r--gdb/serial.h47
7 files changed, 121 insertions, 98 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f9c280d..bb4cf9e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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)
* 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.
* 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.
@@ -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 (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
diff --git a/gdb/configure.in b/gdb/configure.in
index 8c68e72..23ffb9e 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -54,7 +54,7 @@ m68k-sony-*) gdb_host=news ;;
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 ;;
@@ -82,7 +82,7 @@ rs6000-*-*) gdb_host=rs6000 ;;
sparc-*-solaris2*) gdb_host=sun4sol2 ;;
sparc-*-sunos4*) gdb_host=sun4os4 ;;
-sparc-*-*) gdb_host=sun4 ;;
+sparc-*-*) gdb_host=sun4os4 ;;
tahoe-*-*) gdb_host=tahoe ;;
@@ -169,7 +169,6 @@ m68k-isi-*) gdb_target=isi ;;
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 ;;
@@ -212,7 +211,7 @@ sparc-*-elf) gdb_target=sparc-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 ;;
diff --git a/gdb/i960-pinsn.c b/gdb/i960-pinsn.c
index 2569328..7d3f491 100644
--- a/gdb/i960-pinsn.c
+++ b/gdb/i960-pinsn.c
@@ -328,7 +328,7 @@ mem( memaddr, word1, word2, noprint )
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
diff --git a/gdb/remote-hms.c b/gdb/remote-hms.c
index 8636ae2..e000957 100644
--- a/gdb/remote-hms.c
+++ b/gdb/remote-hms.c
@@ -235,7 +235,7 @@ dcache_init ()
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
diff --git a/gdb/ser-go32.c b/gdb/ser-go32.c
index 419f8ff..3e446aa 100644
--- a/gdb/ser-go32.c
+++ b/gdb/ser-go32.c
@@ -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.
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
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"
@@ -57,13 +60,17 @@ static int iov;
#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);
@@ -72,7 +79,8 @@ void mono_put(char byte, char attr)
#endif
-static char far *aptr(short p)
+static char far *
+aptr(short p)
{
#ifdef __GNUC__
return (char *)((unsigned)async - OFFSET + p);
@@ -81,7 +89,8 @@ static char far *aptr(short p)
#endif
}
-static ASYNC_STRUCT far *getivec(int which)
+static ASYNC_STRUCT far *
+getivec(int which)
{
ASYNC_STRUCT far *a;
@@ -100,7 +109,8 @@ static ASYNC_STRUCT far *getivec(int which)
return a;
}
-int dos_async_init()
+int
+dos_async_init()
{
int i;
ASYNC_STRUCT far *a1;
@@ -145,6 +155,7 @@ C> gdb \n");
return 2;
}
+void
dos_async_tx(char c)
{
dprintf("dos_async_tx: enter %x - with IOV %x", c, com_lsr);
@@ -157,12 +168,14 @@ dos_async_tx(char c)
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 - ");
@@ -185,12 +198,14 @@ int dos_async_rx()
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();
@@ -199,7 +214,8 @@ int dos_kb_rx()
#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;
@@ -226,7 +242,8 @@ int dosasync_read(int fd, char *buffer, int length, int timeout)
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--)
@@ -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;
while (*s)
@@ -248,30 +266,27 @@ char *strlwr(char *s)
return p;
}
-sigsetmask() {
+sigsetmask()
+{
}
-
-
-
-static int fd;
-
-CONST char *
-DEFUN_VOID(serial_default_name)
+
+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;
@@ -279,12 +294,12 @@ DEFUN(serial_open,(name),
}
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;
}
@@ -296,31 +311,28 @@ DEFUN(serial_timedreadchar,(to, ok),
}
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 ()
{
-
-
}
-
diff --git a/gdb/ser-termios.c b/gdb/ser-termios.c
index 3bf8f17..357c2e8 100644
--- a/gdb/ser-termios.c
+++ b/gdb/ser-termios.c
@@ -1,7 +1,5 @@
-/* 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.
@@ -25,26 +23,27 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#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);
@@ -55,8 +54,8 @@ DEFUN_VOID(serial_normal)
}
int
-DEFUN(serial_open,(name),
- CONST char *name)
+serial_open (name)
+ const char *name;
{
struct termios termios;
@@ -88,9 +87,9 @@ DEFUN(serial_open,(name),
}
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;
@@ -135,6 +134,7 @@ static struct {int rate, damn_b;} baudtab[] = {
{9600, B9600},
{19200, B19200},
+ {38400, B38400},
#if 0
{300, B300},
{1200, B1200},
@@ -145,8 +145,8 @@ static struct {int rate, damn_b;} baudtab[] = {
};
static int
-DEFUN(damn_b,(rate),
- int rate)
+damn_b (rate)
+ int rate;
{
int i;
for (i = 0; baudtab[i].rate != -1; i++)
@@ -160,7 +160,8 @@ DEFUN(damn_b,(rate),
}
int
-DEFUN(serial_setbaudrate,(rate),int rate)
+serial_setbaudrate (rate)
+ int rate;
{
struct termios termios;
@@ -179,8 +180,8 @@ DEFUN(serial_setbaudrate,(rate),int rate)
}
int
-DEFUN(serial_nextbaudrate,(rate),
- int rate)
+serial_nextbaudrate (rate)
+ int rate;
{
int lookup;
lookup = damn_b(rate);
@@ -193,16 +194,16 @@ DEFUN(serial_nextbaudrate,(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));
}
diff --git a/gdb/serial.h b/gdb/serial.h
index 7a5b05b..f560418 100644
--- a/gdb/serial.h
+++ b/gdb/serial.h
@@ -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.
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. */
/* 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));