From 25c0ff28f3f9131094e00ea540147e34af5afacd Mon Sep 17 00:00:00 2001 From: jhb Date: Mon, 11 Sep 2000 04:33:36 +0000 Subject: Add a nasty hack to get remote kernel gdb working from ddb. ddb would complain before that a suitable gdb port had not been setup because gdbdev was NULL. This abuses the fact that the gdb port is hard-coded to the address normally assigned to sio1 and thus hard-codes in sio1 as the gdb port. Yuck. --- sys/dev/sio/sio.c | 9 +++++++++ sys/isa/sio.c | 9 +++++++++ 2 files changed, 18 insertions(+) (limited to 'sys') diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 4742523..8826c41 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -3240,10 +3240,19 @@ siogdbattach(port, speed) int s; u_char cfcr; struct siocnstate sp; + int unit = 1; /* XXX !!! */ siogdbiobase = port; gdbdefaultrate = speed; + printf("sio%d: gdb debugging port\n", unit); + siogdbunit = unit; +#if DDB > 0 + gdbdev = makedev(CDEV_MAJOR, unit); + gdb_getc = siocngetc; + gdb_putc = siocnputc; +#endif + s = spltty(); /* diff --git a/sys/isa/sio.c b/sys/isa/sio.c index 4742523..8826c41 100644 --- a/sys/isa/sio.c +++ b/sys/isa/sio.c @@ -3240,10 +3240,19 @@ siogdbattach(port, speed) int s; u_char cfcr; struct siocnstate sp; + int unit = 1; /* XXX !!! */ siogdbiobase = port; gdbdefaultrate = speed; + printf("sio%d: gdb debugging port\n", unit); + siogdbunit = unit; +#if DDB > 0 + gdbdev = makedev(CDEV_MAJOR, unit); + gdb_getc = siocngetc; + gdb_putc = siocnputc; +#endif + s = spltty(); /* -- cgit v1.1