xref: /haiku/headers/private/kernel/arch/user_debugger.h (revision d9cebac2b77547b7064f22497514eecd2d047160)
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 #include <debugger.h>
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 // Enable this to get support for kernel breakpoints.
15 //#define KERNEL_BREAKPOINTS 1
16 
17 struct arch_team_debug_info;
18 struct arch_thread_debug_info;
19 
20 void arch_clear_team_debug_info(struct arch_team_debug_info *info);
21 void arch_destroy_team_debug_info(struct arch_team_debug_info *info);
22 void arch_clear_thread_debug_info(struct arch_thread_debug_info *info);
23 void arch_destroy_thread_debug_info(struct arch_thread_debug_info *info);
24 
25 void arch_set_debug_cpu_state(const struct debug_cpu_state *cpuState);
26 void arch_get_debug_cpu_state(struct debug_cpu_state *cpuState);
27 
28 status_t arch_set_breakpoint(void *address);
29 status_t arch_clear_breakpoint(void *address);
30 status_t arch_set_watchpoint(void *address, uint32 type, int32 length);
31 status_t arch_clear_watchpoint(void *address);
32 
33 #if KERNEL_BREAKPOINTS
34 status_t arch_set_kernel_breakpoint(void *address);
35 status_t arch_clear_kernel_breakpoint(void *address);
36 status_t arch_set_kernel_watchpoint(void *address, uint32 type, int32 length);
37 status_t arch_clear_kernel_watchpoint(void *address);
38 #endif
39 
40 #ifdef __cplusplus
41 }
42 #endif
43 
44 #include <arch_user_debugger.h>
45 
46 #endif	// KERNEL_ARCH_USER_DEBUGGER_H
47