db_machdep.h revision 1.2.2.3 1 1.2.2.2 rmind /* $NetBSD: db_machdep.h,v 1.2.2.3 2011/05/31 03:04:23 rmind Exp $ */
2 1.2.2.2 rmind
3 1.2.2.2 rmind #ifndef _X86_DB_MACHDEP_H_
4 1.2.2.2 rmind #define _X86_DB_MACHDEP_H_
5 1.2.2.2 rmind
6 1.2.2.2 rmind #define INKERNEL(va) (((vaddr_t)(va)) >= VM_MIN_KERNEL_ADDRESS)
7 1.2.2.2 rmind
8 1.2.2.2 rmind #define NONE 0
9 1.2.2.2 rmind #define TRAP 1
10 1.2.2.2 rmind #define SYSCALL 2
11 1.2.2.2 rmind #define INTERRUPT 3
12 1.2.2.2 rmind #define INTERRUPT_TSS 4
13 1.2.2.2 rmind #define TRAP_TSS 5
14 1.2.2.2 rmind
15 1.2.2.2 rmind #define MAXNARG 16
16 1.2.2.2 rmind
17 1.2.2.2 rmind struct db_variable;
18 1.2.2.2 rmind
19 1.2.2.2 rmind #ifdef __x86_64__
20 1.2.2.2 rmind #define tf_sp tf_rsp
21 1.2.2.2 rmind #define tf_ip tf_rip
22 1.2.2.2 rmind #define tf_bp tf_rbp
23 1.2.2.2 rmind #define pcb_bp pcb_rbp
24 1.2.2.3 rmind #define pcb_sp pcb_rsp
25 1.2.2.2 rmind #define x86_frame x86_64_frame
26 1.2.2.2 rmind #else
27 1.2.2.2 rmind #define tf_sp tf_esp
28 1.2.2.2 rmind #define tf_ip tf_eip
29 1.2.2.2 rmind #define tf_bp tf_ebp
30 1.2.2.2 rmind #define pcb_bp pcb_ebp
31 1.2.2.3 rmind #define pcb_sp pcb_esp
32 1.2.2.2 rmind #define x86_frame i386_frame
33 1.2.2.2 rmind #endif
34 1.2.2.2 rmind
35 1.2.2.2 rmind int db_x86_regop(const struct db_variable *, db_expr_t *, int);
36 1.2.2.2 rmind int db_numargs(long *);
37 1.2.2.2 rmind int db_nextframe(long **, long **, long **, db_addr_t *, long *, int,
38 1.2.2.2 rmind void (*) (const char *, ...));
39 1.2.2.2 rmind db_sym_t db_frame_info(long *, db_addr_t, const char **, db_expr_t *,
40 1.2.2.2 rmind int *, int *);
41 1.2.2.2 rmind
42 1.2.2.2 rmind #endif /* _X86_DB_MACHDEP_H_ */
43