From 7812d678d84c4501907555daa446df444d3c19a8 Mon Sep 17 00:00:00 2001 From: fvdl Date: Mon, 5 Nov 2001 21:39:24 +0000 Subject: [PATCH] Initialize the cn_magic goo for kgdb (bah, that should really not be necessary). --- sys/dev/ic/com.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index b73744bb90cf..96238a56ef9e 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $NetBSD: com.c,v 1.189 2001/09/17 02:47:13 briggs Exp $ */ +/* $NetBSD: com.c,v 1.190 2001/11/05 21:39:24 fvdl Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -2453,6 +2453,13 @@ com_kgdb_attach(iot, iobase, rate, frequency, cflag) if (res) return (res); + /* + * XXXfvdl this shouldn't be needed, but the cn_magic goo + * expects this to be initialized + */ + cn_init_magic(&com_cnm_state); + cn_set_magic("\047\001"); + kgdb_attach(com_kgdb_getc, com_kgdb_putc, NULL); kgdb_dev = 123; /* unneeded, only to satisfy some tests */