Added "message" debugger command to reprint the message printed when

entering KDL.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23516 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-01-14 13:04:13 +00:00
parent 07a6b56636
commit 945a060042
+18
View File
@@ -67,6 +67,8 @@ static struct debugger_command *sCommands;
static jmp_buf sInvokeCommandEnv; static jmp_buf sInvokeCommandEnv;
static bool sInvokeCommandDirectly = false; static bool sInvokeCommandDirectly = false;
static const char* sCurrentKernelDebuggerMessage;
#define SYSLOG_BUFFER_SIZE 65536 #define SYSLOG_BUFFER_SIZE 65536
#define OUTPUT_BUFFER_SIZE 1024 #define OUTPUT_BUFFER_SIZE 1024
static char sOutputBuffer[OUTPUT_BUFFER_SIZE]; static char sOutputBuffer[OUTPUT_BUFFER_SIZE];
@@ -563,6 +565,18 @@ cmd_continue(int argc, char **argv)
} }
static int
cmd_dump_kdl_message(int argc, char **argv)
{
if (sCurrentKernelDebuggerMessage) {
kputs(sCurrentKernelDebuggerMessage);
kputchar('\n');
}
return 0;
}
static status_t static status_t
syslog_sender(void *data) syslog_sender(void *data)
{ {
@@ -806,6 +820,8 @@ debug_init_post_vm(kernel_args *args)
add_debugger_command("exit", &cmd_continue, "Same as \"continue\""); add_debugger_command("exit", &cmd_continue, "Same as \"continue\"");
add_debugger_command("es", &cmd_continue, "Same as \"continue\""); add_debugger_command("es", &cmd_continue, "Same as \"continue\"");
add_debugger_command("continue", &cmd_continue, "Leave kernel debugger"); add_debugger_command("continue", &cmd_continue, "Leave kernel debugger");
add_debugger_command("message", &cmd_dump_kdl_message,
"Reprint the message printed when entering KDL");
frame_buffer_console_init(args); frame_buffer_console_init(args);
arch_debug_console_init_settings(args); arch_debug_console_init_settings(args);
@@ -994,6 +1010,8 @@ kernel_debugger(const char *message)
if (message) if (message)
kprintf("PANIC: %s\n", message); kprintf("PANIC: %s\n", message);
sCurrentKernelDebuggerMessage = message;
kernel_debugger_loop(); kernel_debugger_loop();
set_dprintf_enabled(dprintfState); set_dprintf_enabled(dprintfState);