6 * GDB architecture specifics
8 * This file declares functions for manipulating the machine state and
15 typedef unsigned long gdbreg_t;
17 /* The register snapshot, this must be in sync with interrupt handler and the
20 // STUB: don't expect this to work!
24 GDBMACH_SIZEOF_REGS = GDBMACH_NREGS * sizeof ( gdbreg_t )
27 /* Breakpoint types */
36 static inline void gdbmach_set_pc ( gdbreg_t *regs, gdbreg_t pc ) {
37 regs [ GDBMACH_EIP ] = pc;
40 static inline void gdbmach_set_single_step ( gdbreg_t *regs, int step ) {
41 regs [ GDBMACH_EFLAGS ] &= ~( 1 << 8 ); /* Trace Flag (TF) */
42 regs [ GDBMACH_EFLAGS ] |= ( step << 8 );
45 static inline void gdbmach_breakpoint ( void ) {
46 __asm__ __volatile__ ( "int $3\n" );
49 extern int gdbmach_set_breakpoint ( int type, unsigned long addr, size_t len, int enable );
51 extern void gdbmach_init ( void );
53 #endif /* GDBMACH_H */