diff --git a/kernel/config/rules.cml b/kernel/config/rules.cml index acf499c7..80e2e6e6 100644 --- a/kernel/config/rules.cml +++ b/kernel/config/rules.cml @@ -139,7 +139,6 @@ Enables kernel event logging and kernel performance counters. # # debugger menu # -KDB 'Enable Kernel Debugger' KDB_BOOT_CONS 'Kernel Debugger console used at boot time' KDB_CONS_COM 'Serial Port' KDB_CONS_KBD 'Keyboard' @@ -355,17 +354,15 @@ menu kdb_console unless ARCH_X86 suppress KDB_CONS_KBD unless ARCH_X86 or ARCH_POWERPC suppress KDB_CONS_COM - default KDB_CONS_COM from y default KDB_COMPORT from 0 default KDB_COMSPEED from 115200 range 115200 57600 38400 19200 9600 4800 2400 1200 300 default KDB_BOOT_CONS from 0 range 0 1 2 -unless KDB suppress dependent kdb_console +unless DEBUG suppress dependent kdb_console menu debugger - KDB kdb_console KDB_DISAS KDB_ON_STARTUP @@ -376,7 +373,6 @@ menu debugger default DEBUG from y unless DEBUG suppress dependent debugger -unless KDB suppress dependent KDB_DISAS KDB_ON_STARTUP KDB_BREAKIN trace unless ARCH_X86 suppress dependent KDB_INPUT_HLT KDB_BREAKIN_BREAK default KDB_BREAKIN_ESCAPE from y default KDB_BREAKIN_BREAK from y diff --git a/kernel/kdb/generic/console.cc b/kernel/kdb/generic/console.cc index 1732f050..fdf5acd2 100644 --- a/kernel/kdb/generic/console.cc +++ b/kernel/kdb/generic/console.cc @@ -38,17 +38,12 @@ //#define CONFIG_SMP_OUTPUTPREFIX 1 word_t kdb_current_console; - void init_console (void) { - for (kdb_current_console=0; kdb_current_console < CONFIG_KDB_BOOT_CONS; kdb_current_console++) - { - if (kdb_consoles[kdb_current_console].name == NULL) - { - kdb_current_console = 0; - break; - } - } + + kdb_current_console = min(kdb_num_consoles, (word_t) CONFIG_KDB_BOOT_CONS); + kdb_current_console = 0; + if (kdb_consoles[kdb_current_console].init) kdb_consoles[kdb_current_console].init (); } diff --git a/kernel/src/glue/v4-x86/vrt_io.cc b/kernel/src/glue/v4-x86/vrt_io.cc index 7b78646f..787b0e9a 100644 --- a/kernel/src/glue/v4-x86/vrt_io.cc +++ b/kernel/src/glue/v4-x86/vrt_io.cc @@ -1,6 +1,6 @@ /********************************************************************* * - * Copyright (C) 2005-2008, Karlsruhe University + * Copyright (C) 2005-2008, 2010, Karlsruhe University * * File path: glue/v4-x86/vrt_io.cc * Description: VRT for thread objects @@ -95,7 +95,7 @@ void vrt_io_t::operator delete (void * v) */ void vrt_io_t::init (void) { -#if defined(CONFIG_KDB) +#if defined(CONFIG_DEBUG) // Initialize name to "io
". word_t idx = 4 + sizeof (word_t) * 2; @@ -186,7 +186,7 @@ mdb_t * vrt_io_t::get_mapdb (void) */ const char * vrt_io_t::get_name (void) { -#if defined(CONFIG_KDB) +#if defined(CONFIG_DEBUG) return name; #else return ""; diff --git a/kernel/src/kdb/console.h b/kernel/src/kdb/console.h index 14f66000..754e5337 100644 --- a/kernel/src/kdb/console.h +++ b/kernel/src/kdb/console.h @@ -1,6 +1,6 @@ /********************************************************************* * - * Copyright (C) 2002, 2004, 2007, Karlsruhe University + * Copyright (C) 2002, 2004, 2007, 2010, Karlsruhe University * * File path: kdb/console.h * Description: Generic KDB console functionality @@ -49,6 +49,7 @@ public: extern kdb_console_t kdb_consoles[]; extern word_t kdb_current_console; +extern word_t kdb_num_consoles; #endif /* !__KDB__CONSOLE_H__ */