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