bochs 配置命令:
./configure --enable-debugger --enable-disasm 配置为调试模式
./configure --enable-plugins --enable-disasm --enable-gdb-stub 配置为gdb调试模式
编译遇到的问题:
configure时提示:ERROR: X windows gui was selected, but X windows libraries were not found.
需要安装xorg-dev包:apt-get install xorg-dev
make时错误:
1.make时提示:
../iodev/harddrv.h:292:error:extra qualification 'sparse_image_t::' on member ' get _physical_offset'
../iodev/harddrv.h:297:error:extra qualification 'sparse_iamge_t::' on member ' set_virtual_page'
解决办法:harddrv.h的292行,是个宏定义,PARANOID应该是定义过的,所以把两个sparse_image_t::注释掉了,再次make,出现好多警告,可能是编译器版本高了吧。
2.make错误提示:
error: ISO C++ forbids declaration of ‘hash_map’ with no type”类似错误:这个错误应该也是编译器版本提高后发生的错误;
解决办法:加入hash_map的命名空间,修改bx_debug/dbg_main.cc,在开头处加入以下头文件和命名空间
#include <ext/hash_map>
using namespace __gnu_cxx;
经过以上修改就可以在debian 6.0上编译成功,g++版本是4.4。
其他有可能遇到的问题:ERROR: pkg-config was not found, or unable to access the gtk+-2.0 package,安装libgtk2.0-dev就可以了。