* 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.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||||
@@ -23,6 +23,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
status_t arch_debug_init(kernel_args *args);
|
status_t arch_debug_init(kernel_args *args);
|
||||||
|
void arch_debug_stack_trace(void);
|
||||||
void *arch_debug_get_caller(void);
|
void *arch_debug_get_caller(void);
|
||||||
int32 arch_debug_get_stack_trace(addr_t* returnAddresses, int32 maxCount,
|
int32 arch_debug_get_stack_trace(addr_t* returnAddresses, int32 maxCount,
|
||||||
int32 skipIframes, int32 skipFrames, bool userOnly);
|
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.
|
* Distributed under the terms of the MIT License.
|
||||||
*
|
*
|
||||||
* Authors:
|
* Authors:
|
||||||
@@ -241,6 +241,12 @@ arch_debug_contains_call(struct thread *thread, const char *symbol,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
arch_debug_stack_trace(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void *
|
void *
|
||||||
arch_debug_get_caller(void)
|
arch_debug_get_caller(void)
|
||||||
{
|
{
|
||||||
@@ -376,6 +382,7 @@ arch_debug_init(kernel_args *args)
|
|||||||
return B_NO_ERROR;
|
return B_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
arch_debug_call_with_fault_handler(cpu_ent* cpu, jmp_buf jumpBuffer,
|
arch_debug_call_with_fault_handler(cpu_ent* cpu, jmp_buf jumpBuffer,
|
||||||
void (*function)(void*), void* parameter)
|
void (*function)(void*), void* parameter)
|
||||||
|
|||||||
@@ -253,6 +253,12 @@ arch_debug_save_registers(int *regs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
arch_debug_stack_trace(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
arch_debug_contains_call(struct thread *thread, const char *symbol,
|
arch_debug_contains_call(struct thread *thread, const char *symbol,
|
||||||
addr_t start, addr_t end)
|
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
|
bool
|
||||||
arch_debug_contains_call(struct thread *thread, const char *symbol,
|
arch_debug_contains_call(struct thread *thread, const char *symbol,
|
||||||
addr_t start, addr_t end)
|
addr_t start, addr_t end)
|
||||||
|
|||||||
@@ -883,6 +883,13 @@ cmd_in_context(int argc, char** argv)
|
|||||||
// #pragma mark -
|
// #pragma mark -
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
arch_debug_stack_trace(void)
|
||||||
|
{
|
||||||
|
stack_trace(0, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
arch_debug_contains_call(struct thread *thread, const char *symbol,
|
arch_debug_contains_call(struct thread *thread, const char *symbol,
|
||||||
addr_t start, addr_t end)
|
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;
|
int32 continuableLine = -1;
|
||||||
// Index of the previous command line, if the command returned
|
// Index of the previous command line, if the command returned
|
||||||
// B_KDEBUG_CONT, i.e. asked to be repeatable, -1 otherwise.
|
// B_KDEBUG_CONT, i.e. asked to be repeatable, -1 otherwise.
|
||||||
|
|||||||
Reference in New Issue
Block a user