diff options
author | phk <phk@FreeBSD.org> | 1999-05-09 10:51:13 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-05-09 10:51:13 +0000 |
commit | e8f4fc4a1d3555ba5d3ce423b41c82b7fce94a63 (patch) | |
tree | 623bf04dc60f78005b62c8986b81469006615edb /sys/dev/sio | |
parent | e85d75ef71e87265d72acde0261bcc0bd8b5ad6f (diff) | |
download | FreeBSD-src-e8f4fc4a1d3555ba5d3ce423b41c82b7fce94a63.zip FreeBSD-src-e8f4fc4a1d3555ba5d3ce423b41c82b7fce94a63.tar.gz |
add some amount of sanity to the way the gdb stuff finds its device.
I'm not too happy about the result either, but at least it has less
chance of backfiring.
This particular feature could be called "a mess" without offending
anybody.
Diffstat (limited to 'sys/dev/sio')
-rw-r--r-- | sys/dev/sio/sio.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 77ea392..0f4cc01 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sio.c,v 1.234 1999/05/08 21:59:30 dfr Exp $ + * $Id: sio.c,v 1.235 1999/05/09 10:28:50 phk Exp $ * from: @(#)com.c 7.5 (Berkeley) 5/16/91 * from: i386/isa sio.c,v 1.234 */ @@ -2639,13 +2639,10 @@ static cn_putc_t siocnputc; CONS_DRIVER(sio, siocnprobe, siocninit, siocngetc, siocncheckc, siocnputc); -/* - * Routines to support GDB on an sio port. - */ -dev_t gdbdev; -cn_getc_t *gdb_getc; -cn_putc_t *gdb_putc; - +/* To get the GDB related variables */ +#if DDB > 0 +#include <ddb/ddb.h> +#endif #endif static void @@ -2848,20 +2845,23 @@ siocnprobe(cp) siogdbiobase = iobase; siogdbunit = unit; #ifdef __i386__ +#if DDB > 0 gdbdev = makedev(CDEV_MAJOR, unit); gdb_getc = siocngetc; gdb_putc = siocnputc; #endif +#endif } } } #ifdef __i386__ +#if DDB > 0 /* * XXX Ugly Compatability. * If no gdb port has been specified, set it to be the console * as some configuration files don't specify the gdb port. */ - if (gdbdev == -1 && (boothowto & RB_GDB)) { + if (gdbdev == NODEV && (boothowto & RB_GDB)) { printf("Warning: no GDB port specified. Defaulting to sio%d.\n", siocnunit); printf("Set flag 0x80 on desired GDB port in your\n"); @@ -2873,6 +2873,7 @@ siocnprobe(cp) gdb_putc = siocnputc; } #endif +#endif } #ifdef __alpha__ |