1 /* 2 * Copyright 2005, Ingo Weinhold, bonefish@users.sf.net. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef KERNEL_ARCH_USER_DEBUGGER_H 6 #define KERNEL_ARCH_USER_DEBUGGER_H 7 8 // Enable this to get support for kernel breakpoints. 9 //#define KERNEL_BREAKPOINTS 1 10 11 #ifndef _ASSEMBLER 12 13 #include <debugger.h> 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 struct arch_team_debug_info; 20 struct arch_thread_debug_info; 21 22 void arch_clear_team_debug_info(struct arch_team_debug_info *info); 23 void arch_destroy_team_debug_info(struct arch_team_debug_info *info); 24 void arch_clear_thread_debug_info(struct arch_thread_debug_info *info); 25 void arch_destroy_thread_debug_info(struct arch_thread_debug_info *info); 26 27 void arch_update_thread_single_step(); 28 29 void arch_set_debug_cpu_state(const struct debug_cpu_state *cpuState); 30 void arch_get_debug_cpu_state(struct debug_cpu_state *cpuState); 31 32 status_t arch_set_breakpoint(void *address); 33 status_t arch_clear_breakpoint(void *address); 34 status_t arch_set_watchpoint(void *address, uint32 type, int32 length); 35 status_t arch_clear_watchpoint(void *address); 36 bool arch_has_breakpoints(struct arch_team_debug_info *info); 37 38 #if KERNEL_BREAKPOINTS 39 status_t arch_set_kernel_breakpoint(void *address); 40 status_t arch_clear_kernel_breakpoint(void *address); 41 status_t arch_set_kernel_watchpoint(void *address, uint32 type, int32 length); 42 status_t arch_clear_kernel_watchpoint(void *address); 43 #endif 44 45 #ifdef __cplusplus 46 } 47 #endif 48 49 #include <arch_user_debugger.h> 50 51 #endif // _ASSEMBLER 52 53 #endif // KERNEL_ARCH_USER_DEBUGGER_H 54