2 * include/asm-m68k/kgdb.h
4 * Copyright (C) 1996 Roman Hodek
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.
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
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 );
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
57 extern inline void breakpoint( void )
59 if (!kgdb_initialized
)
60 /* if kgdb not inited, do nothing */
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 */
76 /* TRAP #14 is reported as SIGABORT */
77 __asm__
__volatile__ ( "trap #14" );
80 #endif /* __ASSEMBLY__ */
82 #endif /* __ASM_M68k_KGDB_H */