You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bochs.h 747B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef BOCHS_H
  2. #define BOCHS_H
  3. /** @file
  4. *
  5. * bochs breakpoints
  6. *
  7. * This file defines @c bochsbp, the magic breakpoint instruction that
  8. * is incredibly useful when debugging under bochs. This file should
  9. * never be included in production code.
  10. *
  11. * Use the pseudo-instruction @c bochsbp in assembly code, or the
  12. * bochsbp() function in C code.
  13. *
  14. */
  15. #ifdef ASSEMBLY
  16. /* Breakpoint for when debugging under bochs */
  17. #define bochsbp xchgw %bx, %bx
  18. #define BOCHSBP bochsbp
  19. #else /* ASSEMBLY */
  20. /** Breakpoint for when debugging under bochs */
  21. static inline void bochsbp ( void ) {
  22. __asm__ __volatile__ ( "xchgw %bx, %bx" );
  23. }
  24. #endif /* ASSEMBLY */
  25. #warning "bochs.h should not be included into production code"
  26. #endif /* BOCHS_H */