1 #ifndef _ASM_X86_KGDB_H
2 #define _ASM_X86_KGDB_H
5 * Copyright (C) 2001-2004 Amit S. Kale
6 * Copyright (C) 2008 Wind River Systems, Inc.
9 #include <asm/ptrace.h>
12 * BUFMAX defines the maximum number of characters in inbound/outbound
13 * buffers at least NUMREGBYTES*2 are needed for register packets
14 * Longer buffer is needed to list all threads
19 * Note that this register image is in a different order than
20 * the register image that Linux produces at interrupt time.
22 * Linux's register image is defined by struct pt_regs in ptrace.h.
23 * Just why GDB uses a different order is a historical mystery.
35 GDB_PC
, /* 8 also known as eip */
36 GDB_PS
, /* 9 also known as eflags */
44 #define GDB_ORIG_AX 41
45 #define DBG_MAX_REG_NUM 16
46 #define NUMREGBYTES ((GDB_GS+1)*4)
47 #else /* ! CONFIG_X86_32 */
74 #define GDB_ORIG_AX 57
75 #define DBG_MAX_REG_NUM 24
76 /* 17 64 bit regs and 5 32 bit regs */
77 #define NUMREGBYTES ((17 * 8) + (5 * 4))
78 #endif /* ! CONFIG_X86_32 */
80 static inline void arch_kgdb_breakpoint(void)
84 #define BREAK_INSTR_SIZE 1
85 #define CACHE_FLUSH_IS_SAFE 1
86 #define GDB_ADJUSTS_BREAK_OFFSET
88 extern int kgdb_ll_trap(int cmd
, const char *str
,
89 struct pt_regs
*regs
, long err
, int trap
, int sig
);
91 #endif /* _ASM_X86_KGDB_H */