ubuntu12.04安装带调试功能的Bochs


         最近想看下于渊的《一个操作系统的实现》,虚拟机新安装的ubuntu12.04,按照书中的说明安装Bochs,为了确保和书中保持一致,特地在Bochs官网下载的Bochs2.3.5的版本。

带调试功能的bochs安装
sudo apt-get install build-essential  安装编译环境

tar vxzf bochs-2.3.5
cd bochs-2.3.5
./configure --enable-debugger --enable-disasm
make
sudo make install

说明,在./configure 那步开始报错
1、configure: error: C++ preprocessor "/lib/cpp" fails sanity check

解决方法:

http://wiki.ubuntu.org.cn/index.php?title=EclipseSubversion&variant=zh-cn

To solve the error de>C++ preprocessor "/lib/cpp" fails sanity checkde> while compiling Subversion, you need to download GCC, CPP and G++ by installing the following packages

gcc cpp g++

but that is for other Linux distribution system, my is Ubuntu, so we should install the needed libs

sudo apt-get install gcc cpp g++

this will download and install the essential lib that is build related, such as gcc g++

2、
  解决方法:配置的时候加上--with-nogui参数,./configure --with-nogui;或者apt-get install xorg-dev
                    apt-get报错的可以使用sudo aptitude install xorg-dev
3、
    
     解决方法:
     在做make 之前, 需要在bx_debug/symbols.cc 97行之后加上一些代码,加后如下所示:

usingnamespace std;

#ifdef__GNUC__  (新加的,注意前后都是两个下划线)

usingnamespace __gnu_cxx;(新加的,注意前面是两个下划线)

#endif (新加的)

structsymbol_entry_t;



非常感谢:http://blog.csdn.net/boat_man/article/details/6098386



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值