summaryrefslogtreecommitdiffstats
path: root/sys/ddb
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-05-09 10:51:13 +0000
committerphk <phk@FreeBSD.org>1999-05-09 10:51:13 +0000
commite8f4fc4a1d3555ba5d3ce423b41c82b7fce94a63 (patch)
tree623bf04dc60f78005b62c8986b81469006615edb /sys/ddb
parente85d75ef71e87265d72acde0261bcc0bd8b5ad6f (diff)
downloadFreeBSD-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/ddb')
-rw-r--r--sys/ddb/db_command.c10
-rw-r--r--sys/ddb/ddb.h12
2 files changed, 18 insertions, 4 deletions
diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c
index f86ad2f..6e0e932 100644
--- a/sys/ddb/db_command.c
+++ b/sys/ddb/db_command.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_command.c,v 1.29 1999/01/14 06:22:01 jdp Exp $
+ * $Id: db_command.c,v 1.30 1999/05/07 23:08:23 mckusick Exp $
*/
/*
@@ -39,6 +39,8 @@
#include <sys/reboot.h>
#include <sys/systm.h>
+#include <machine/cons.h>
+
#include <ddb/ddb.h>
#include <ddb/db_command.h>
#include <ddb/db_lex.h>
@@ -535,7 +537,9 @@ db_fncall(dummy1, dummy2, dummy3, dummy4)
/* Enter GDB remote protocol debugger on the next trap. */
-dev_t gdbdev;
+dev_t gdbdev = NODEV;
+cn_getc_t *gdb_getc;
+cn_putc_t *gdb_putc;
static void
db_gdb (dummy1, dummy2, dummy3, dummy4)
@@ -545,7 +549,7 @@ db_gdb (dummy1, dummy2, dummy3, dummy4)
char * dummy4;
{
- if (gdbdev == -1) {
+ if (gdbdev == NODEV) {
db_printf("No gdb port enabled. Set flag 0x80 on desired port\n");
db_printf("in your configuration file (currently sio only).\n");
return;
diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h
index dcce9b2..38bf3cb 100644
--- a/sys/ddb/ddb.h
+++ b/sys/ddb/ddb.h
@@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: ddb.h,v 1.20 1998/07/13 06:45:23 bde Exp $
+ * $Id: ddb.h,v 1.21 1999/01/27 19:00:49 dillon Exp $
*/
/*
@@ -145,4 +145,14 @@ struct command {
struct command *more; /* another level of command */
};
+/* XXX: UGLY hack */
+#ifdef CN_DEAD
+/*
+ * Routines to support GDB on an sio port.
+ */
+extern dev_t gdbdev;
+extern cn_getc_t *gdb_getc;
+extern cn_putc_t *gdb_putc;
+#endif
+
#endif /* !_DDB_DDB_H_ */
OpenPOWER on IntegriCloud