iPXE
bochs.h
Go to the documentation of this file.
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 */
static void bochsbp(void)
Breakpoint for when debugging under bochs.
Definition: bochs.h:26
__asm__ __volatile__("\n1:\n\t" "movb -1(%2,%1), %%al\n\t" "stosb\n\t" "loop 1b\n\t" "xorl %%eax, %%eax\n\t" "mov %3, %1\n\t" "rep stosb\n\t" :"=&D"(discard_D), "=&c"(discard_c) :"r"(data), "g"(pad_len), "0"(value0), "1"(len) :"eax")
__asm__(".section \".rodata\", \"a\", " PROGBITS "\n\t" "\nprivate_key_data:\n\t" ".size private_key_data, ( . - private_key_data )\n\t" ".equ private_key_len, ( . - private_key_data )\n\t" ".previous\n\t")