diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-07-28 19:09:44 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-07-28 19:09:44 -0400 |
commit | f15cbe6f1a4b4d9df59142fc8e4abb973302cf44 (patch) | |
tree | 774d7b11abaaf33561ab8268bf51ddd9ceb79025 /arch/sh/include/asm/kgdb.h | |
parent | 25326277d8d1393d1c66240e6255aca780f9e3eb (diff) |
sh: migrate to arch/sh/include/
This follows the sparc changes a439fe51a1f8eb087c22dd24d69cebae4a3addac.
Most of the moving about was done with Sam's directions at:
http://marc.info/?l=linux-sh&m=121724823706062&w=2
with subsequent hacking and fixups entirely my fault.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/kgdb.h')
-rw-r--r-- | arch/sh/include/asm/kgdb.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/arch/sh/include/asm/kgdb.h b/arch/sh/include/asm/kgdb.h new file mode 100644 index 000000000000..24e42078f36f --- /dev/null +++ b/arch/sh/include/asm/kgdb.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * May be copied or modified under the terms of the GNU General Public | ||
3 | * License. See linux/COPYING for more information. | ||
4 | * | ||
5 | * Based on original code by Glenn Engel, Jim Kingdon, | ||
6 | * David Grothe <dave@gcom.com>, Tigran Aivazian, <tigran@sco.com> and | ||
7 | * Amit S. Kale <akale@veritas.com> | ||
8 | * | ||
9 | * Super-H port based on sh-stub.c (Ben Lee and Steve Chamberlain) by | ||
10 | * Henry Bell <henry.bell@st.com> | ||
11 | * | ||
12 | * Header file for low-level support for remote debug using GDB. | ||
13 | * | ||
14 | */ | ||
15 | |||
16 | #ifndef __KGDB_H | ||
17 | #define __KGDB_H | ||
18 | |||
19 | #include <asm/ptrace.h> | ||
20 | |||
21 | /* Same as pt_regs but has vbr in place of syscall_nr */ | ||
22 | struct kgdb_regs { | ||
23 | unsigned long regs[16]; | ||
24 | unsigned long pc; | ||
25 | unsigned long pr; | ||
26 | unsigned long sr; | ||
27 | unsigned long gbr; | ||
28 | unsigned long mach; | ||
29 | unsigned long macl; | ||
30 | unsigned long vbr; | ||
31 | }; | ||
32 | |||
33 | /* State info */ | ||
34 | extern char kgdb_in_gdb_mode; | ||
35 | extern int kgdb_nofault; /* Ignore bus errors (in gdb mem access) */ | ||
36 | extern char in_nmi; /* Debounce flag to prevent NMI reentry*/ | ||
37 | |||
38 | /* SCI */ | ||
39 | extern int kgdb_portnum; | ||
40 | extern int kgdb_baud; | ||
41 | extern char kgdb_parity; | ||
42 | extern char kgdb_bits; | ||
43 | |||
44 | /* Init and interface stuff */ | ||
45 | extern int kgdb_init(void); | ||
46 | extern int (*kgdb_getchar)(void); | ||
47 | extern void (*kgdb_putchar)(int); | ||
48 | |||
49 | /* Trap functions */ | ||
50 | typedef void (kgdb_debug_hook_t)(struct pt_regs *regs); | ||
51 | typedef void (kgdb_bus_error_hook_t)(void); | ||
52 | extern kgdb_debug_hook_t *kgdb_debug_hook; | ||
53 | extern kgdb_bus_error_hook_t *kgdb_bus_err_hook; | ||
54 | |||
55 | /* Console */ | ||
56 | struct console; | ||
57 | void kgdb_console_write(struct console *co, const char *s, unsigned count); | ||
58 | extern int kgdb_console_setup(struct console *, char *); | ||
59 | |||
60 | /* Prototypes for jmp fns */ | ||
61 | #define _JBLEN 9 | ||
62 | typedef int jmp_buf[_JBLEN]; | ||
63 | extern void longjmp(jmp_buf __jmpb, int __retval); | ||
64 | extern int setjmp(jmp_buf __jmpb); | ||
65 | |||
66 | /* Forced breakpoint */ | ||
67 | #define breakpoint() __asm__ __volatile__("trapa #0x3c") | ||
68 | |||
69 | #endif | ||