1 /* 2 * Copyright 2005-2008, Axel Dörfler, axeld@pinc-software.de. 3 * Distributed under the terms of the MIT License. 4 * 5 * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. 6 * Distributed under the terms of the NewOS License. 7 */ 8 #ifndef _KERNEL_ARCH_DEBUG_H 9 #define _KERNEL_ARCH_DEBUG_H 10 11 12 #include <SupportDefs.h> 13 14 struct kernel_args; 15 struct thread; 16 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 status_t arch_debug_init(kernel_args *args); 23 void *arch_debug_get_caller(void); 24 int32 arch_debug_get_stack_trace(addr_t* returnAddresses, int32 maxCount, 25 int32 skipFrames, bool userOnly); 26 void *arch_debug_get_interrupt_pc(); 27 bool arch_debug_contains_call(struct thread *thread, const char *symbol, 28 addr_t start, addr_t end); 29 void arch_debug_save_registers(int *); 30 31 bool arch_is_debug_variable_defined(const char* variableName); 32 status_t arch_set_debug_variable(const char* variableName, uint64 value); 33 status_t arch_get_debug_variable(const char* variableName, uint64* value); 34 35 #ifdef __cplusplus 36 } 37 #endif 38 39 #endif /* _KERNEL_ARCH_DEBUG_H */ 40