iPXE
Functions
bochs.h File Reference

bochs breakpoints More...

Go to the source code of this file.

Functions

static void bochsbp (void)
 Breakpoint for when debugging under bochs. More...
 

Detailed Description

bochs breakpoints

This file defines bochsbp, the magic breakpoint instruction that is incredibly useful when debugging under bochs. This file should never be included in production code.

Use the pseudo-instruction bochsbp in assembly code, or the bochsbp() function in C code.

Definition in file bochs.h.

Function Documentation

◆ bochsbp()

static void bochsbp ( void  )
inlinestatic

Breakpoint for when debugging under bochs.

Definition at line 26 of file bochs.h.

26  {
27  __asm__ __volatile__ ( "xchgw %bx, %bx" );
28 }
__asm__ __volatile__("\n1:\n\t" "movb -1(%3,%1), %%al\n\t" "stosb\n\t" "loop 1b\n\t" "xorl %%eax, %%eax\n\t" "mov %4, %1\n\t" "rep stosb\n\t" :"=&D"(discard_D), "=&c"(discard_c), "+m"(*value) :"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")

References __asm__(), and __volatile__().