* Moved the addition of the basic debugger commands directly after the VM init.
* Separated the other stuff previously done in debug_init_post_vm() to the new debug_init_post_settings(). * Removed superfluous status_t return codes - they are ignored, anyway, and if there really is a show stopper in the init process, panicking would be the thing one should do. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36623 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2008, Axel Dörfler, [email protected]
|
* Copyright 2002-2010, Axel Dörfler, [email protected]
|
||||||
* Distributed under the terms of the Haiku License.
|
* Distributed under the terms of the Haiku License.
|
||||||
*
|
*
|
||||||
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||||
@@ -114,9 +114,10 @@ extern "C" {
|
|||||||
|
|
||||||
struct kernel_args;
|
struct kernel_args;
|
||||||
|
|
||||||
extern status_t debug_init(struct kernel_args *args);
|
extern void debug_init(struct kernel_args *args);
|
||||||
extern status_t debug_init_post_vm(struct kernel_args *args);
|
extern void debug_init_post_vm(struct kernel_args *args);
|
||||||
extern status_t debug_init_post_modules(struct kernel_args *args);
|
extern void debug_init_post_settings(struct kernel_args *args);
|
||||||
|
extern void debug_init_post_modules(struct kernel_args *args);
|
||||||
extern void debug_early_boot_message(const char *string);
|
extern void debug_early_boot_message(const char *string);
|
||||||
extern void debug_puts(const char *s, int32 length);
|
extern void debug_puts(const char *s, int32 length);
|
||||||
extern bool debug_debugger_running(void);
|
extern bool debug_debugger_running(void);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2008-2010, Ingo Weinhold, [email protected].
|
* Copyright 2008-2010, Ingo Weinhold, [email protected].
|
||||||
* Copyright 2002-2009, Axel Dörfler, [email protected].
|
* Copyright 2002-2010, Axel Dörfler, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
* Copyright 2001, Travis Geiselbrecht. All rights reserved.
|
||||||
@@ -1622,7 +1622,7 @@ debug_early_boot_message(const char* string)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
void
|
||||||
debug_init(kernel_args* args)
|
debug_init(kernel_args* args)
|
||||||
{
|
{
|
||||||
new(&gDefaultDebugOutputFilter) DefaultDebugOutputFilter;
|
new(&gDefaultDebugOutputFilter) DefaultDebugOutputFilter;
|
||||||
@@ -1630,11 +1630,11 @@ debug_init(kernel_args* args)
|
|||||||
syslog_init(args);
|
syslog_init(args);
|
||||||
|
|
||||||
debug_paranoia_init();
|
debug_paranoia_init();
|
||||||
return arch_debug_console_init(args);
|
arch_debug_console_init(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
void
|
||||||
debug_init_post_vm(kernel_args* args)
|
debug_init_post_vm(kernel_args* args)
|
||||||
{
|
{
|
||||||
add_debugger_command_etc("cpu", &cmd_switch_cpu,
|
add_debugger_command_etc("cpu", &cmd_switch_cpu,
|
||||||
@@ -1653,13 +1653,19 @@ debug_init_post_vm(kernel_args* args)
|
|||||||
"entering KDL.\n", 0);
|
"entering KDL.\n", 0);
|
||||||
|
|
||||||
debug_builtin_commands_init();
|
debug_builtin_commands_init();
|
||||||
|
arch_debug_init(args);
|
||||||
|
|
||||||
debug_heap_init();
|
debug_heap_init();
|
||||||
debug_variables_init();
|
debug_variables_init();
|
||||||
frame_buffer_console_init(args);
|
frame_buffer_console_init(args);
|
||||||
arch_debug_console_init_settings(args);
|
arch_debug_console_init_settings(args);
|
||||||
tracing_init();
|
tracing_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
debug_init_post_settings(struct kernel_args* args)
|
||||||
|
{
|
||||||
// get debug settings
|
// get debug settings
|
||||||
|
|
||||||
sSerialDebugEnabled = get_safemode_boolean("serial_debug_output",
|
sSerialDebugEnabled = get_safemode_boolean("serial_debug_output",
|
||||||
@@ -1679,12 +1685,10 @@ debug_init_post_vm(kernel_args* args)
|
|||||||
blue_screen_enter(true);
|
blue_screen_enter(true);
|
||||||
|
|
||||||
syslog_init_post_vm(args);
|
syslog_init_post_vm(args);
|
||||||
|
|
||||||
return arch_debug_init(args);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
void
|
||||||
debug_init_post_modules(struct kernel_args* args)
|
debug_init_post_modules(struct kernel_args* args)
|
||||||
{
|
{
|
||||||
void* cookie;
|
void* cookie;
|
||||||
@@ -1722,7 +1726,7 @@ debug_init_post_modules(struct kernel_args* args)
|
|||||||
}
|
}
|
||||||
close_module_list(cookie);
|
close_module_list(cookie);
|
||||||
|
|
||||||
return frame_buffer_console_init_post_modules(args);
|
frame_buffer_console_init_post_modules(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2009, Axel Dörfler, [email protected].
|
* Copyright 2002-2010, Axel Dörfler, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||||
* Distributed under the terms of the NewOS License.
|
* Distributed under the terms of the NewOS License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/*! This is main - initializes the kernel and launches the Bootscript */
|
/*! This is main - initializes the kernel and launches the Bootscript */
|
||||||
|
|
||||||
|
|
||||||
@@ -122,6 +123,7 @@ _start(kernel_args *bootKernelArgs, int currentCPU)
|
|||||||
vm_init(&sKernelArgs);
|
vm_init(&sKernelArgs);
|
||||||
// Before vm_init_post_sem() is called, we have to make sure that
|
// Before vm_init_post_sem() is called, we have to make sure that
|
||||||
// the boot loader allocated region is not used anymore
|
// the boot loader allocated region is not used anymore
|
||||||
|
debug_init_post_vm(&sKernelArgs);
|
||||||
low_resource_manager_init();
|
low_resource_manager_init();
|
||||||
|
|
||||||
// now we can use the heap and create areas
|
// now we can use the heap and create areas
|
||||||
@@ -130,7 +132,7 @@ _start(kernel_args *bootKernelArgs, int currentCPU)
|
|||||||
TRACE("init driver_settings\n");
|
TRACE("init driver_settings\n");
|
||||||
boot_item_init();
|
boot_item_init();
|
||||||
driver_settings_init(&sKernelArgs);
|
driver_settings_init(&sKernelArgs);
|
||||||
debug_init_post_vm(&sKernelArgs);
|
debug_init_post_settings(&sKernelArgs);
|
||||||
TRACE("init notification services\n");
|
TRACE("init notification services\n");
|
||||||
notifications_init();
|
notifications_init();
|
||||||
TRACE("init teams\n");
|
TRACE("init teams\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user