* Added an arch_debug_stack_trace() function that is called from the KDL loop
in case there aren't any KDL commands available yet. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33642 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2005-2008, Axel Dörfler, [email protected].
|
||||
* Copyright 2005-2009, Axel Dörfler, [email protected].
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||
@@ -23,6 +23,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
status_t arch_debug_init(kernel_args *args);
|
||||
void arch_debug_stack_trace(void);
|
||||
void *arch_debug_get_caller(void);
|
||||
int32 arch_debug_get_stack_trace(addr_t* returnAddresses, int32 maxCount,
|
||||
int32 skipIframes, int32 skipFrames, bool userOnly);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2003-2008, Haiku Inc. All rights reserved.
|
||||
* Copyright 2003-2009, Haiku Inc. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
@@ -241,6 +241,12 @@ arch_debug_contains_call(struct thread *thread, const char *symbol,
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_debug_stack_trace(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void *
|
||||
arch_debug_get_caller(void)
|
||||
{
|
||||
@@ -376,19 +382,20 @@ arch_debug_init(kernel_args *args)
|
||||
return B_NO_ERROR;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_debug_call_with_fault_handler(cpu_ent* cpu, jmp_buf jumpBuffer,
|
||||
void (*function)(void*), void* parameter)
|
||||
void (*function)(void*), void* parameter)
|
||||
{
|
||||
// TODO: Implement! Most likely in assembly.
|
||||
longjmp(jumpBuffer, 1);
|
||||
// TODO: Implement! Most likely in assembly.
|
||||
longjmp(jumpBuffer, 1);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_debug_unset_current_thread(void)
|
||||
{
|
||||
// TODO: Implement!
|
||||
// TODO: Implement!
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -253,6 +253,12 @@ arch_debug_save_registers(int *regs)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_debug_stack_trace(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
arch_debug_contains_call(struct thread *thread, const char *symbol,
|
||||
addr_t start, addr_t end)
|
||||
|
||||
@@ -259,6 +259,13 @@ arch_debug_save_registers(int *regs)
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
arch_debug_stack_trace(void)
|
||||
{
|
||||
stack_trace(0, NULL);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
arch_debug_contains_call(struct thread *thread, const char *symbol,
|
||||
addr_t start, addr_t end)
|
||||
|
||||
@@ -883,6 +883,13 @@ cmd_in_context(int argc, char** argv)
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
void
|
||||
arch_debug_stack_trace(void)
|
||||
{
|
||||
stack_trace(0, NULL);
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
arch_debug_contains_call(struct thread *thread, const char *symbol,
|
||||
addr_t start, addr_t end)
|
||||
|
||||
@@ -733,6 +733,9 @@ kernel_debugger_loop(const char* message, int32 cpu)
|
||||
}
|
||||
}
|
||||
|
||||
if (!has_debugger_command("help"))
|
||||
arch_debug_stack_trace();
|
||||
|
||||
int32 continuableLine = -1;
|
||||
// Index of the previous command line, if the command returned
|
||||
// B_KDEBUG_CONT, i.e. asked to be repeatable, -1 otherwise.
|
||||
|
||||
Reference in New Issue
Block a user