diff options
author | simokawa <simokawa@FreeBSD.org> | 2007-05-27 13:58:43 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 2007-05-27 13:58:43 +0000 |
commit | 12d8c7f3b203c6f0e3688bf697d411d7b1d0e583 (patch) | |
tree | 8175e7b0dca84ca0d82f8807c1007cfd00c55be4 /sys/dev/dcons | |
parent | 048e4018c8d35c1436a9fa15d93261419a0de9d4 (diff) | |
download | FreeBSD-src-12d8c7f3b203c6f0e3688bf697d411d7b1d0e583.zip FreeBSD-src-12d8c7f3b203c6f0e3688bf697d411d7b1d0e583.tar.gz |
Make compile without GDB option.
MFC after: 3 days
Diffstat (limited to 'sys/dev/dcons')
-rw-r--r-- | sys/dev/dcons/dcons_os.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/dev/dcons/dcons_os.c b/sys/dev/dcons/dcons_os.c index a6d78aa..4048466 100644 --- a/sys/dev/dcons/dcons_os.c +++ b/sys/dev/dcons/dcons_os.c @@ -71,9 +71,12 @@ #include <vm/vm_param.h> #include <vm/pmap.h> -#include "opt_ddb.h" #include "opt_comconsole.h" #include "opt_dcons.h" +#include "opt_kdb.h" +#include "opt_gdb.h" +#include "opt_ddb.h" + #ifndef DCONS_POLL_HZ #define DCONS_POLL_HZ 100 @@ -178,7 +181,7 @@ static cn_putc_t dcons_cnputc; CONSOLE_DRIVER(dcons); -#if __FreeBSD_version >= 502122 +#if defined(GDB) && (__FreeBSD_version >= 502122) static gdb_probe_f dcons_dbg_probe; static gdb_init_f dcons_dbg_init; static gdb_term_f dcons_dbg_term; @@ -191,7 +194,7 @@ GDB_DBGPORT(dcons, dcons_dbg_probe, dcons_dbg_init, dcons_dbg_term, extern struct gdb_dbgport *gdb_cur; #endif -#if (defined(KDB) || defined(DDB)) && defined(ALT_BREAK_TO_DEBUGGER) +#if (defined(GDB) || defined(DDB)) && defined(ALT_BREAK_TO_DEBUGGER) static int dcons_check_break(struct dcons_softc *dc, int c) { @@ -200,12 +203,14 @@ dcons_check_break(struct dcons_softc *dc, int c) #if __FreeBSD_version >= 502122 if (kdb_alt_break(c, &dc->brk_state)) { +#ifdef GDB if ((dc->flags & DC_GDB) != 0) { if (gdb_cur == &dcons_gdb_dbgport) { kdb_dbbe_select("gdb"); breakpoint(); } } else +#endif breakpoint(); } #else @@ -251,6 +256,7 @@ dcons_os_checkc(struct dcons_softc *dc) return (c); } +#if defined(GDB) || !defined(CONS_NODEV) static int dcons_os_getc(struct dcons_softc *dc) { @@ -260,6 +266,7 @@ dcons_os_getc(struct dcons_softc *dc) return (c & 0xff); } +#endif static void dcons_os_putc(struct dcons_softc *dc, int c) @@ -705,7 +712,7 @@ dcons_modevent(module_t mode, int type, void *data) return(err); } -#if __FreeBSD_version >= 502122 +#if defined(GDB) && (__FreeBSD_version >= 502122) /* Debugger interface */ static int |