* add p cc
[mascara-docs.git] / i386 / linux / linux-2.3.21 / include / asm-m68k / kgdb.h
blobe1d3c493f98a0451753f89d1352f54fddfe3fe18
1 /*
2 * include/asm-m68k/kgdb.h
4 * Copyright (C) 1996 Roman Hodek
5 */
7 #ifndef __ASM_M68k_KGDB_H
8 #define __ASM_M68k_KGDB_H
11 * Structure to save all register values in, already in the order gdb wants
12 * it. Note that the upper half of the SR field is recycled for the FORMAT and
13 * VECTOR fields. Hope that doesn't confuse gdb... That upper half is ignored
14 * on exiting the stub, so gdb can modify it as it likes.
17 #define GDBREG_A6 14
18 #define GDBREG_A7 15
19 #define GDBREG_SP 15
20 #define GDBREG_SR 16
21 #define GDBREG_PC 17
22 #define GDBREG_FP0 18
23 #define GDBREG_FP7 25
24 #define GDBREG_FPCR 26
25 #define GDBREG_FPIAR 28
27 #define GDBOFFA_D6 (6*4)
28 #define GDBOFFA_A3 (11*4)
30 #define NUMREGSBYTES 180
32 #ifndef __ASSEMBLY__
34 struct gdb_regs {
35 long regs[16]; /* d0-a7 */
36 unsigned format : 4; /* frame format specifier */
37 unsigned vector : 12; /* vector offset */
38 unsigned short sr; /* status register */
39 unsigned long pc; /* program counter */
40 unsigned long fpregs[8*3]; /* fp0-fp7 */
41 unsigned long fpcntl[3]; /* fpcr, fpsr, fpiar */
44 extern struct gdb_regs kgdb_registers;
45 extern void kgdb_init( void );
46 struct frame;
47 extern asmlinkage void enter_kgdb( struct pt_regs *fp );
49 extern int kgdb_initialized;
52 * This function will generate a breakpoint exception. It is used at the
53 * beginning of a program to sync up with a debugger and can be used
54 * otherwise as a quick means to stop program execution and "break" into
55 * the debugger.
57 extern inline void breakpoint( void )
59 if (!kgdb_initialized)
60 /* if kgdb not inited, do nothing */
61 return;
63 /* breakpoint instruction is TRAP #15 */
64 __asm__ __volatile__ ( "trap #15" );
68 * This function will report a SIGABORT to gdb.
70 extern inline void kgdb_abort( void )
72 if (!kgdb_initialized)
73 /* if kgdb not inited, do nothing */
74 return;
76 /* TRAP #14 is reported as SIGABORT */
77 __asm__ __volatile__ ( "trap #14" );
80 #endif /* __ASSEMBLY__ */
82 #endif /* __ASM_M68k_KGDB_H */