Changeset e07fe0c in mainline
- Timestamp:
- 2005-12-12T17:23:09Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fbe058f
- Parents:
- ebbdb8f
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
arch/mips32/src/exception.c
rebbdb8f re07fe0c 38 38 #include <print.h> 39 39 #include <interrupt.h> 40 #include <func.h> 41 #include <console/kconsole.h> 40 42 41 43 static char * exctable[] = { … … 86 88 { 87 89 struct exception_regdump *pstate = (struct exception_regdump *)data; 90 char *symbol = get_symtab_entry(pstate->epc); 91 92 #ifdef CONFIG_DEBUG 93 printf("***Breakpoint %p in %s.\n", pstate->epc, symbol); 94 printf("***Type 'exit' to exit kconsole.\n"); 95 /* Umm..we should rather set some 'debugstate' here */ 96 haltstate = 1; 97 kconsole("debug"); 98 haltstate = 0; 99 #endif 100 88 101 /* it is necessary to not re-execute BREAK instruction after 89 102 returning from Exception handler -
generic/include/console/kconsole.h
rebbdb8f re07fe0c 69 69 70 70 extern void kconsole_init(void); 71 extern void kconsole(void * arg);71 extern void kconsole(void *prompt); 72 72 73 73 extern int cmd_register(cmd_info_t *cmd); -
generic/src/console/cmd.c
rebbdb8f re07fe0c 59 59 }; 60 60 61 static cmd_info_t exit_info = { 62 .name = "exit", 63 .description ="Exit kconsole", 64 .argc = 0 65 }; 66 61 67 /** Data and methods for 'description' command. */ 62 68 static int cmd_desc(cmd_arg_t *argv); … … 257 263 if (!cmd_register(&desc_info)) 258 264 panic("could not register command %s\n", desc_info.name); 265 266 cmd_initialize(&exit_info); 267 if (!cmd_register(&exit_info)) 268 panic("could not register command %s\n", exit_info.name); 259 269 260 270 cmd_initialize(&symaddr_info); -
generic/src/console/kconsole.c
rebbdb8f re07fe0c 41 41 #include <func.h> 42 42 #include <symtab.h> 43 #include <macros.h> 43 44 44 45 /** Simple kernel console. … … 396 397 * @param arg Not used. 397 398 */ 398 void kconsole(void * arg)399 void kconsole(void *prompt) 399 400 { 400 401 cmd_info_t *cmd_info; … … 408 409 409 410 while (true) { 410 cmdline = clever_readline( __FUNCTION__, stdin);411 cmdline = clever_readline(prompt, stdin); 411 412 len = strlen(cmdline); 412 413 if (!len) … … 415 416 if (!cmd_info) 416 417 continue; 418 if (strncmp(cmd_info->name,"exit", \ 419 min(strlen(cmd_info->name),5)) == 0) 420 break; 417 421 (void) cmd_info->func(cmd_info->argv); 418 422 } -
generic/src/lib/func.c
rebbdb8f re07fe0c 49 49 #ifdef CONFIG_DEBUG 50 50 printf("\n"); 51 kconsole( NULL); /* Run kconsole as a last resort to user */51 kconsole("panic"); /* Run kconsole as a last resort to user */ 52 52 #endif 53 53 -
generic/src/main/kinit.c
rebbdb8f re07fe0c 134 134 * Create kernel console. 135 135 */ 136 if (t = thread_create(kconsole, NULL, TASK, 0))136 if (t = thread_create(kconsole, "kconsole", TASK, 0)) 137 137 thread_ready(t); 138 138 else panic("thread_create/kconsole\n"); -
kernel.config
rebbdb8f re07fe0c 82 82 @ "thread/thread1" Thread test 1 83 83 @ "mm/mapping1" Mapping test 1 84 @ [ARCH=mips32] "debug/mips1" Mips breakpoint-debug test 84 85 ! CONFIG_TEST (choice)
Note:
See TracChangeset
for help on using the changeset viewer.