diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 11:37:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 11:37:01 -0400 |
commit | 9732b6112343df2872518ec6701c8ef729310a05 (patch) | |
tree | 9e3dcc461845038da4730c2062eee546348ca445 /include/asm-x86 | |
parent | 9e9abecfc0ff3a9ad2ead954b37bbfcb863c775e (diff) | |
parent | 1a9a3e76dde191f82f7a8a66059dcbb4a9f63ff3 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-kgdb
* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-kgdb:
kgdb: always use icache flush for sw breakpoints
kgdb: fix SMP NMI kgdb_handle_exception exit race
kgdb: documentation fixes
kgdb: allow static kgdbts boot configuration
kgdb: add documentation
kgdb: Kconfig fix
kgdb: add kgdb internal test suite
kgdb: fix several kgdb regressions
kgdb: kgdboc pl011 I/O module
kgdb: fix optional arch functions and probe_kernel_*
kgdb: add x86 HW breakpoints
kgdb: print breakpoint removed on exception
kgdb: clocksource watchdog
kgdb: fix NMI hangs
kgdb: fix kgdboc dynamic module configuration
kgdb: document parameters
x86: kgdb support
consoles: polling support, kgdboc
kgdb: core
uaccess: add probe_kernel_write()
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/kdebug.h | 1 | ||||
-rw-r--r-- | include/asm-x86/kgdb.h | 81 |
2 files changed, 82 insertions, 0 deletions
diff --git a/include/asm-x86/kdebug.h b/include/asm-x86/kdebug.h index 0c4175390dab..96651bb59ba1 100644 --- a/include/asm-x86/kdebug.h +++ b/include/asm-x86/kdebug.h | |||
@@ -20,6 +20,7 @@ enum die_val { | |||
20 | DIE_CALL, | 20 | DIE_CALL, |
21 | DIE_NMI_IPI, | 21 | DIE_NMI_IPI, |
22 | DIE_PAGE_FAULT, | 22 | DIE_PAGE_FAULT, |
23 | DIE_NMIUNKNOWN, | ||
23 | }; | 24 | }; |
24 | 25 | ||
25 | extern void printk_address(unsigned long address, int reliable); | 26 | extern void printk_address(unsigned long address, int reliable); |
diff --git a/include/asm-x86/kgdb.h b/include/asm-x86/kgdb.h new file mode 100644 index 000000000000..484c47554f3b --- /dev/null +++ b/include/asm-x86/kgdb.h | |||
@@ -0,0 +1,81 @@ | |||
1 | #ifndef _ASM_KGDB_H_ | ||
2 | #define _ASM_KGDB_H_ | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 2001-2004 Amit S. Kale | ||
6 | * Copyright (C) 2008 Wind River Systems, Inc. | ||
7 | */ | ||
8 | |||
9 | /* | ||
10 | * BUFMAX defines the maximum number of characters in inbound/outbound | ||
11 | * buffers at least NUMREGBYTES*2 are needed for register packets | ||
12 | * Longer buffer is needed to list all threads | ||
13 | */ | ||
14 | #define BUFMAX 1024 | ||
15 | |||
16 | /* | ||
17 | * Note that this register image is in a different order than | ||
18 | * the register image that Linux produces at interrupt time. | ||
19 | * | ||
20 | * Linux's register image is defined by struct pt_regs in ptrace.h. | ||
21 | * Just why GDB uses a different order is a historical mystery. | ||
22 | */ | ||
23 | #ifdef CONFIG_X86_32 | ||
24 | enum regnames { | ||
25 | GDB_AX, /* 0 */ | ||
26 | GDB_CX, /* 1 */ | ||
27 | GDB_DX, /* 2 */ | ||
28 | GDB_BX, /* 3 */ | ||
29 | GDB_SP, /* 4 */ | ||
30 | GDB_BP, /* 5 */ | ||
31 | GDB_SI, /* 6 */ | ||
32 | GDB_DI, /* 7 */ | ||
33 | GDB_PC, /* 8 also known as eip */ | ||
34 | GDB_PS, /* 9 also known as eflags */ | ||
35 | GDB_CS, /* 10 */ | ||
36 | GDB_SS, /* 11 */ | ||
37 | GDB_DS, /* 12 */ | ||
38 | GDB_ES, /* 13 */ | ||
39 | GDB_FS, /* 14 */ | ||
40 | GDB_GS, /* 15 */ | ||
41 | }; | ||
42 | #else /* ! CONFIG_X86_32 */ | ||
43 | enum regnames { | ||
44 | GDB_AX, /* 0 */ | ||
45 | GDB_DX, /* 1 */ | ||
46 | GDB_CX, /* 2 */ | ||
47 | GDB_BX, /* 3 */ | ||
48 | GDB_SI, /* 4 */ | ||
49 | GDB_DI, /* 5 */ | ||
50 | GDB_BP, /* 6 */ | ||
51 | GDB_SP, /* 7 */ | ||
52 | GDB_R8, /* 8 */ | ||
53 | GDB_R9, /* 9 */ | ||
54 | GDB_R10, /* 10 */ | ||
55 | GDB_R11, /* 11 */ | ||
56 | GDB_R12, /* 12 */ | ||
57 | GDB_R13, /* 13 */ | ||
58 | GDB_R14, /* 14 */ | ||
59 | GDB_R15, /* 15 */ | ||
60 | GDB_PC, /* 16 */ | ||
61 | GDB_PS, /* 17 */ | ||
62 | }; | ||
63 | #endif /* CONFIG_X86_32 */ | ||
64 | |||
65 | /* | ||
66 | * Number of bytes of registers: | ||
67 | */ | ||
68 | #ifdef CONFIG_X86_32 | ||
69 | # define NUMREGBYTES 64 | ||
70 | #else | ||
71 | # define NUMREGBYTES ((GDB_PS+1)*8) | ||
72 | #endif | ||
73 | |||
74 | static inline void arch_kgdb_breakpoint(void) | ||
75 | { | ||
76 | asm(" int $3"); | ||
77 | } | ||
78 | #define BREAK_INSTR_SIZE 1 | ||
79 | #define CACHE_FLUSH_IS_SAFE 1 | ||
80 | |||
81 | #endif /* _ASM_KGDB_H_ */ | ||