|
|
1.1 root 1: #ifndef BOCHS_H
2: #define BOCHS_H
3:
4: /** @file
5: *
6: * bochs breakpoints
7: *
8: * This file defines @c bochsbp, the magic breakpoint instruction that
9: * is incredibly useful when debugging under bochs. This file should
10: * never be included in production code.
11: *
12: * Use the pseudo-instruction @c bochsbp in assembly code, or the
13: * bochsbp() function in C code.
14: *
15: */
16:
17: #ifdef ASSEMBLY
18:
19: /* Breakpoint for when debugging under bochs */
20: #define bochsbp xchgw %bx, %bx
21: #define BOCHSBP bochsbp
22:
23: #else /* ASSEMBLY */
24:
25: /** Breakpoint for when debugging under bochs */
26: static inline void bochsbp ( void ) {
27: __asm__ __volatile__ ( "xchgw %bx, %bx" );
28: }
29:
30: #endif /* ASSEMBLY */
31:
32: #warning "bochs.h should not be included into production code"
33:
34: #endif /* BOCHS_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.