summaryrefslogtreecommitdiffstats
path: root/sys/dev/sio
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2000-09-11 04:33:36 +0000
committerjhb <jhb@FreeBSD.org>2000-09-11 04:33:36 +0000
commit25c0ff28f3f9131094e00ea540147e34af5afacd (patch)
tree9cccc1bd5ed6429ee349209b7aba0d17da3d4eb8 /sys/dev/sio
parent577d7fbf37c1b81455f6a9b6dcde4c729969bcf9 (diff)
downloadFreeBSD-src-25c0ff28f3f9131094e00ea540147e34af5afacd.zip
FreeBSD-src-25c0ff28f3f9131094e00ea540147e34af5afacd.tar.gz
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.
Diffstat (limited to 'sys/dev/sio')
-rw-r--r--sys/dev/sio/sio.c9
1 files changed, 9 insertions, 0 deletions
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();
/*
OpenPOWER on IntegriCloud