From owner-p4-projects@FreeBSD.ORG Sun May 23 14:22:27 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 797CA16A4D0; Sun, 23 May 2004 14:22:27 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 53BAC16A4CE for ; Sun, 23 May 2004 14:22:27 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 34FB943D31 for ; Sun, 23 May 2004 14:22:27 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i4NLM72b086516 for ; Sun, 23 May 2004 14:22:07 -0700 (PDT) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i4NLM6GX086510 for perforce@freebsd.org; Sun, 23 May 2004 14:22:06 -0700 (PDT) (envelope-from marcel@freebsd.org) Date: Sun, 23 May 2004 14:22:06 -0700 (PDT) Message-Id: <200405232122.i4NLM6GX086510@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 53357 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 May 2004 21:22:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=53357 Change 53357 by marcel@marcel_nfs on 2004/05/23 14:22:00 Remove support for GDB in its entirety. The GDB backend has its own way for ports to register itself. The dcons(4) driver needs to be rewritten to make use of that. Affected files ... .. //depot/projects/gdb/sys/dev/dcons/dcons.c#4 edit Differences ... ==== //depot/projects/gdb/sys/dev/dcons/dcons.c#4 (text+ko) ==== @@ -36,6 +36,7 @@ */ #include +#include #include #include #include @@ -72,10 +73,6 @@ #define DCONS_FORCE_CONSOLE 0 /* mostly for FreeBSD-4 */ #endif -#ifndef DCONS_FORCE_GDB -#define DCONS_FORCE_GDB 1 -#endif - #if __FreeBSD_version >= 500101 #define CONS_NODEV 1 /* for latest current */ static struct consdev gdbconsdev; @@ -133,7 +130,6 @@ dev_t dev; struct dcons_ch o, i; int brk_state; -#define DC_GDB 1 int flags; } sc[DCONS_NPORT]; static void dcons_tty_start(struct tty *); @@ -397,26 +393,9 @@ ch->pos = 0; } -#if DDB && ALT_BREAK_TO_DEBUGGER - switch (dc->brk_state) { - case STATE1: - if (c == KEY_TILDE) - dc->brk_state = STATE2; - else - dc->brk_state = STATE0; - break; - case STATE2: - dc->brk_state = STATE0; - if (c == KEY_CTRLB) { -#if DCONS_FORCE_GDB - if (dc->flags & DC_GDB) - boothowto |= RB_GDB; -#endif - breakpoint(); - } - } - if (c == KEY_CR) - dc->brk_state = STATE1; +#if KDB && ALT_BREAK_TO_DEBUGGER + if (kdb_alt_break(c, &dc->brk_state)) + breakpoint(); #endif return (c); } @@ -510,20 +489,6 @@ dcons_init_port(1, offset, size - size0); dg.buf->version = htonl(DCONS_VERSION); dg.buf->magic = ntohl(DCONS_MAGIC); - -#if DDB && DCONS_FORCE_GDB -#if CONS_NODEV - gdbconsdev.cn_arg = (void *)&sc[DCONS_GDB]; -#if __FreeBSD_version >= 501109 - sprintf(gdbconsdev.cn_name, "dgdb"); -#endif - gdb_arg = &gdbconsdev; -#else - gdbdev = makedev(CDEV_MAJOR, DCONS_GDB); -#endif - gdb_getc = dcons_cngetc; - gdb_putc = dcons_cnputc; -#endif drv_init = 1; return 0; @@ -559,7 +524,6 @@ int polltime; dcons_attach_port(DCONS_CON, "dcons", 0); - dcons_attach_port(DCONS_GDB, "dgdb", DC_GDB); #if __FreeBSD_version < 500000 callout_init(&dcons_callout); #else @@ -621,18 +585,10 @@ case MOD_UNLOAD: printf("dcons: unload\n"); callout_stop(&dcons_callout); -#if DDB && DCONS_FORCE_GDB -#if CONS_NODEV - gdb_arg = NULL; -#else - gdbdev = NODEV; -#endif -#endif #if __FreeBSD_version >= 500000 cnremove(&dcons_consdev); #endif dcons_detach(DCONS_CON); - dcons_detach(DCONS_GDB); dg.buf->magic = 0; contigfree(dg.buf, DCONS_BUF_SIZE, M_DEVBUF);