1. 程式人生 > >bochs神奇的任意斷點除錯

bochs神奇的任意斷點除錯

#=======================================================================
# MAGIC_BREAK:
# This enables the "magic breakpoint" feature when using the debugger.
# The useless cpu instruction XCHG BX, BX causes Bochs to enter the
# debugger mode. This might be useful for software development.
#
# Example:
#   magic_break: enabled=1

#======================================================================

正如這個配置名字所描述的那樣magic,真正做到任意斷點除錯!

如果是GCC的嵌入彙編可以這樣寫:

__asm__("xchg %%bx,%%bx"::);