Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 609 → Rev 608

/kernel/trunk/generic/src/console/cmd.c
58,12 → 58,6
.argc = 0
};
 
static cmd_info_t exit_info = {
.name = "exit",
.description ="Exit kconsole",
.argc = 0
};
 
/** Data and methods for 'description' command. */
static int cmd_desc(cmd_arg_t *argv);
static void desc_help(void);
262,10 → 256,6
cmd_initialize(&desc_info);
if (!cmd_register(&desc_info))
panic("could not register command %s\n", desc_info.name);
 
cmd_initialize(&exit_info);
if (!cmd_register(&exit_info))
panic("could not register command %s\n", exit_info.name);
cmd_initialize(&symaddr_info);
if (!cmd_register(&symaddr_info))
/kernel/trunk/generic/src/console/kconsole.c
40,7 → 40,6
#include <debug.h>
#include <func.h>
#include <symtab.h>
#include <macros.h>
 
/** Simple kernel console.
*
396,7 → 395,7
*
* @param arg Not used.
*/
void kconsole(void *prompt)
void kconsole(void *arg)
{
cmd_info_t *cmd_info;
count_t len;
408,7 → 407,7
}
while (true) {
cmdline = clever_readline(prompt, stdin);
cmdline = clever_readline(__FUNCTION__, stdin);
len = strlen(cmdline);
if (!len)
continue;
415,9 → 414,6
cmd_info = parse_cmdline(cmdline, len);
if (!cmd_info)
continue;
if (strncmp(cmd_info->name,"exit", \
min(strlen(cmd_info->name),5)) == 0)
break;
(void) cmd_info->func(cmd_info->argv);
}
}
/kernel/trunk/generic/src/lib/func.c
48,7 → 48,7
interrupts_disable();
#ifdef CONFIG_DEBUG
printf("\n");
kconsole("panic"); /* Run kconsole as a last resort to user */
kconsole(NULL); /* Run kconsole as a last resort to user */
#endif
 
if (CPU)
/kernel/trunk/generic/src/main/kinit.c
133,7 → 133,7
/*
* Create kernel console.
*/
if (t = thread_create(kconsole, "kconsole", TASK, 0))
if (t = thread_create(kconsole, NULL, TASK, 0))
thread_ready(t);
else panic("thread_create/kconsole\n");
 
/kernel/trunk/generic/include/console/kconsole.h
68,7 → 68,7
extern link_t cmd_head;
 
extern void kconsole_init(void);
extern void kconsole(void *prompt);
extern void kconsole(void *arg);
 
extern int cmd_register(cmd_info_t *cmd);
 
/kernel/trunk/arch/mips32/src/exception.c
37,8 → 37,6
#include <symtab.h>
#include <print.h>
#include <interrupt.h>
#include <func.h>
#include <console/kconsole.h>
 
static char * exctable[] = {
"Interrupt","TLB Modified","TLB Invalid","TLB Invalid Store",
87,17 → 85,6
static void breakpoint_exception(int n, void *data)
{
struct exception_regdump *pstate = (struct exception_regdump *)data;
char *symbol = get_symtab_entry(pstate->epc);
 
#ifdef CONFIG_DEBUG
printf("***Breakpoint %p in %s.\n", pstate->epc, symbol);
printf("***Type 'exit' to exit kconsole.\n");
/* Umm..we should rather set some 'debugstate' here */
haltstate = 1;
kconsole("debug");
haltstate = 0;
#endif
 
/* it is necessary to not re-execute BREAK instruction after
returning from Exception handler
(see page 138 in R4000 Manual for more information) */
/kernel/trunk/kernel.config
81,5 → 81,4
@ "print/print1" Printf test 1
@ "thread/thread1" Thread test 1
@ "mm/mapping1" Mapping test 1
@ [ARCH=mips32] "debug/mips1" Mips breakpoint-debug test
! CONFIG_TEST (choice)
/kernel/trunk/test/debug/mips1/test.c
File deleted