uboot-strtoul.patch
[u-boot-openmoko/mini2440.git] / include / kgdb.h
blobf543cd6e1833cd3f3248619ff5365294b30ec2c5
1 #ifndef __KGDB_H__
2 #define __KGDB_H__
4 #include <asm/ptrace.h>
6 #define KGDBERR_BADPARAMS 1
7 #define KGDBERR_NOTHEXDIG 2
8 #define KGDBERR_MEMFAULT 3
9 #define KGDBERR_NOSPACE 4
10 #define KGDBERR_ALIGNFAULT 5
12 #define KGDBDATA_MAXREGS 8
13 #define KGDBDATA_MAXPRIV 8
15 #define KGDBEXIT_TYPEMASK 0xff
17 #define KGDBEXIT_KILL 0
18 #define KGDBEXIT_CONTINUE 1
19 #define KGDBEXIT_SINGLE 2
21 #define KGDBEXIT_WITHADDR 0x100
23 typedef
24 struct {
25 int num;
26 unsigned long val;
28 kgdb_reg;
30 typedef
31 struct {
32 int sigval;
33 int extype;
34 unsigned long exaddr;
35 int nregs;
36 kgdb_reg regs[KGDBDATA_MAXREGS];
37 unsigned long private[KGDBDATA_MAXPRIV];
39 kgdb_data;
41 /* these functions are provided by the generic kgdb support */
42 extern void kgdb_init(void);
43 extern void kgdb_error(int);
44 extern int kgdb_output_string(const char *, unsigned int);
45 extern void breakpoint(void);
47 /* these functions are provided by the platform specific kgdb support */
48 extern void kgdb_flush_cache_range(void *, void *);
49 extern void kgdb_flush_cache_all(void);
50 extern int kgdb_setjmp(long *);
51 extern void kgdb_longjmp(long *, int);
52 extern void kgdb_enter(struct pt_regs *, kgdb_data *);
53 extern void kgdb_exit(struct pt_regs *, kgdb_data *);
54 extern int kgdb_getregs(struct pt_regs *, char *, int);
55 extern void kgdb_putreg(struct pt_regs *, int, char *, int);
56 extern void kgdb_putregs(struct pt_regs *, char *, int);
57 extern int kgdb_trap(struct pt_regs *);
58 extern void kgdb_breakpoint(int argc, char *argv[]);
60 /* these functions are provided by the platform serial driver */
61 extern void kgdb_serial_init(void);
62 extern int getDebugChar(void);
63 extern void putDebugChar(int);
64 extern void putDebugStr(const char *);
65 extern void kgdb_interruptible(int);
67 /* this is referenced in the trap handler for the platform */
68 extern int (*debugger_exception_handler)(struct pt_regs *);
70 #endif /* __KGDB_H__ */