summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-01-31 10:54:45 +0000
committerpeter <peter@FreeBSD.org>2001-01-31 10:54:45 +0000
commit9b4aea27e569dab2275cf27f6e41b39ac65a23c3 (patch)
treed75e841688c9b234051c7a85009cbf3e013f1d36 /sys
parent4abe34416afda81cddb387d70a542952f6de9aa0 (diff)
downloadFreeBSD-src-9b4aea27e569dab2275cf27f6e41b39ac65a23c3.zip
FreeBSD-src-9b4aea27e569dab2275cf27f6e41b39ac65a23c3.tar.gz
Remove count for NSIO. The only places it was used it were incorrect.
(alpha-gdbstub.c got sync'ed up a bit with the i386 version)
Diffstat (limited to 'sys')
-rw-r--r--sys/alpha/alpha/alpha-gdbstub.c32
-rw-r--r--sys/amd64/amd64/amd64-gdbstub.c8
-rw-r--r--sys/conf/files.alpha2
-rw-r--r--sys/conf/files.i3862
-rw-r--r--sys/conf/files.ia642
-rw-r--r--sys/conf/files.pc982
-rw-r--r--sys/dev/sio/sio.c1
-rw-r--r--sys/i386/i386/i386-gdbstub.c8
-rw-r--r--sys/ia64/ia64/ia64-gdbstub.c17
-rw-r--r--sys/isa/sio.c1
-rw-r--r--sys/pc98/cbus/sio.c1
-rw-r--r--sys/pc98/pc98/sio.c1
12 files changed, 18 insertions, 59 deletions
diff --git a/sys/alpha/alpha/alpha-gdbstub.c b/sys/alpha/alpha/alpha-gdbstub.c
index 8b58839..96d55aa 100644
--- a/sys/alpha/alpha/alpha-gdbstub.c
+++ b/sys/alpha/alpha/alpha-gdbstub.c
@@ -105,17 +105,8 @@
#include <setjmp.h>
-/* #include "sio.h" */
#include "opt_ddb.h"
-#include "sio.h"
-
-#if NSIO == 0
-void
-gdb_handle_exception (db_regs_t *raw_regs, int type, int code)
-{
-}
-#else
/************************************************************************/
void gdb_handle_exception (db_regs_t *, int, int);
@@ -135,6 +126,9 @@ extern jmp_buf db_jmpbuf;
be named the same as the standard versions, so that the address `strlen'
is unambiguous... */
+#define strlen gdb_strlen
+#define strcpy gdb_strcpy
+
static int
strlen (const char *s)
{
@@ -155,26 +149,21 @@ strcpy (char *dst, const char *src)
return retval;
}
-/* XXX sio always uses its major with minor 0 no matter what we specify. */
-#define REMOTE_DEV 0
-
static int
putDebugChar (int c) /* write a single character */
{
-#if NSIO > 0
- siogdbputc (c);
-#endif
+ if (gdbdev == NODEV)
+ return 0;
+ (*gdb_putc)(gdbdev, c);
return 1;
}
static int
getDebugChar (void) /* read and return a single char */
{
-#if NSIO > 0
- return siogdbgetc ();
-#else
- return 0;
-#endif
+ if (gdbdev == NODEV)
+ return -1;
+ return (*gdb_getc)(gdbdev);
}
static const char hexchars[]="0123456789abcdef";
@@ -635,6 +624,8 @@ gdb_handle_exception (db_regs_t *raw_regs, int type, int code)
while (1)
{
+ if (gdbdev == NODEV) /* somebody's removed it */
+ return 1; /* get out of here */
remcomOutBuffer[0] = 0;
getpacket (remcomInBuffer);
@@ -750,4 +741,3 @@ gdb_handle_exception (db_regs_t *raw_regs, int type, int code)
putpacket (remcomOutBuffer);
}
}
-#endif /* NSIO > 0 */
diff --git a/sys/amd64/amd64/amd64-gdbstub.c b/sys/amd64/amd64/amd64-gdbstub.c
index b442a37..d045adc 100644
--- a/sys/amd64/amd64/amd64-gdbstub.c
+++ b/sys/amd64/amd64/amd64-gdbstub.c
@@ -102,17 +102,10 @@
#include <setjmp.h>
-#include "sio.h"
#include "opt_ddb.h"
int gdb_handle_exception (db_regs_t *, int, int);
-#if NSIO == 0
-int
-gdb_handle_exception (db_regs_t *raw_regs, int type, int code)
-{
-}
-#else
/************************************************************************/
extern jmp_buf db_jmpbuf;
@@ -626,4 +619,3 @@ gdb_handle_exception (db_regs_t *raw_regs, int type, int code)
}
return 0;
}
-#endif /* NSIO > 0 */
diff --git a/sys/conf/files.alpha b/sys/conf/files.alpha
index 72b1b0a..df14988 100644
--- a/sys/conf/files.alpha
+++ b/sys/conf/files.alpha
@@ -208,7 +208,7 @@ isa/atkbdc_isa.c optional atkbdc
isa/fd.c optional fdc
isa/ppc.c optional ppc
isa/psm.c optional psm
-isa/sio.c count sio
+isa/sio.c optional sio
isa/syscons_isa.c optional sc
isa/vga_isa.c optional vga
kern/subr_diskmbr.c standard
diff --git a/sys/conf/files.i386 b/sys/conf/files.i386
index 038c3bf..2a4d87c 100644
--- a/sys/conf/files.i386
+++ b/sys/conf/files.i386
@@ -353,7 +353,7 @@ isa/atkbdc_isa.c optional atkbdc
isa/fd.c optional fdc
isa/ppc.c optional ppc
isa/psm.c optional psm
-isa/sio.c count sio
+isa/sio.c optional sio
isa/syscons_isa.c optional sc
isa/vga_isa.c optional vga
kern/imgact_aout.c standard
diff --git a/sys/conf/files.ia64 b/sys/conf/files.ia64
index dc5505c..70c453f 100644
--- a/sys/conf/files.ia64
+++ b/sys/conf/files.ia64
@@ -81,7 +81,7 @@ isa/atkbdc_isa.c optional atkbdc
isa/fd.c optional fdc
isa/ppc.c optional ppc
isa/psm.c optional psm
-isa/sio.c count sio
+isa/sio.c optional sio
isa/syscons_isa.c optional sc
isa/vga_isa.c optional vga
kern/subr_diskmbr.c standard
diff --git a/sys/conf/files.pc98 b/sys/conf/files.pc98
index e458bd2..3bccb4f 100644
--- a/sys/conf/files.pc98
+++ b/sys/conf/files.pc98
@@ -365,7 +365,7 @@ pc98/pc98/ppc.c optional ppc
pc98/pc98/scgdcrndr.c optional sc gdc
pc98/pc98/scterm-sck.c optional sc
pc98/pc98/scvtbpc98.c optional sc
-pc98/pc98/sio.c count sio
+pc98/pc98/sio.c optional sio
pc98/pc98/spkr.c optional speaker
pc98/pc98/syscons.c optional sc
pc98/pc98/syscons_pc98.c optional sc
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 3a2de51..332ce49 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -41,7 +41,6 @@
#include "opt_sio.h"
#include "card.h"
#include "pci.h"
-#include "sio.h"
/*
* Serial driver, based on 386BSD-0.1 com driver.
diff --git a/sys/i386/i386/i386-gdbstub.c b/sys/i386/i386/i386-gdbstub.c
index b442a37..d045adc 100644
--- a/sys/i386/i386/i386-gdbstub.c
+++ b/sys/i386/i386/i386-gdbstub.c
@@ -102,17 +102,10 @@
#include <setjmp.h>
-#include "sio.h"
#include "opt_ddb.h"
int gdb_handle_exception (db_regs_t *, int, int);
-#if NSIO == 0
-int
-gdb_handle_exception (db_regs_t *raw_regs, int type, int code)
-{
-}
-#else
/************************************************************************/
extern jmp_buf db_jmpbuf;
@@ -626,4 +619,3 @@ gdb_handle_exception (db_regs_t *raw_regs, int type, int code)
}
return 0;
}
-#endif /* NSIO > 0 */
diff --git a/sys/ia64/ia64/ia64-gdbstub.c b/sys/ia64/ia64/ia64-gdbstub.c
index 4333af2..ec4eb29 100644
--- a/sys/ia64/ia64/ia64-gdbstub.c
+++ b/sys/ia64/ia64/ia64-gdbstub.c
@@ -105,17 +105,8 @@
#include <setjmp.h>
-/* #include "sio.h" */
#include "opt_ddb.h"
-#include "sio.h"
-
-#if NSIO == 0
-void
-gdb_handle_exception (db_regs_t *raw_regs, int type, int code)
-{
-}
-#else
/************************************************************************/
void gdb_handle_exception (db_regs_t *, int);
@@ -130,10 +121,9 @@ extern jmp_buf db_jmpbuf;
/* Create private copies of common functions used by the stub. This prevents
nasty interactions between app code and the stub (for instance if user steps
into strlen, etc..) */
-/* XXX this is fairly bogus. strlen() and strcpy() should be reentrant,
- and are reentrant under FreeBSD. In any case, our versions should not
- be named the same as the standard versions, so that the address `strlen'
- is unambiguous... */
+
+#define strlen gdb_strlen
+#define strcpy gdb_strcpy
static int
strlen (const char *s)
@@ -585,4 +575,3 @@ gdb_handle_exception (db_regs_t *raw_regs, int vector)
}
#endif
}
-#endif /* NSIO > 0 */
diff --git a/sys/isa/sio.c b/sys/isa/sio.c
index 3a2de51..332ce49 100644
--- a/sys/isa/sio.c
+++ b/sys/isa/sio.c
@@ -41,7 +41,6 @@
#include "opt_sio.h"
#include "card.h"
#include "pci.h"
-#include "sio.h"
/*
* Serial driver, based on 386BSD-0.1 com driver.
diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c
index 2a215b1..fbc78bc 100644
--- a/sys/pc98/cbus/sio.c
+++ b/sys/pc98/cbus/sio.c
@@ -41,7 +41,6 @@
#include "opt_sio.h"
#include "card.h"
#include "pci.h"
-#include "sio.h"
/*
* Serial driver, based on 386BSD-0.1 com driver.
diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c
index 2a215b1..fbc78bc 100644
--- a/sys/pc98/pc98/sio.c
+++ b/sys/pc98/pc98/sio.c
@@ -41,7 +41,6 @@
#include "opt_sio.h"
#include "card.h"
#include "pci.h"
-#include "sio.h"
/*
* Serial driver, based on 386BSD-0.1 com driver.
OpenPOWER on IntegriCloud