80x86
Academic
Algorithm
Assembly
Awk
Baidu
Bash
Bash script
boost
Box Computing
BSD
C
Chrome
Cloud Computing
Compiler
Configuration
Cpp
CScript
Debug
ELF
Emacs
Emacs lisp
English
Flow network
Gcc
GDB
grep
Hack
HTML
i386
IE
iPhone
Javascript
Linux
Mac
Makefile
Maths
Maximum flow
MFC
Open Source
OS
OSDev
pdb
PHP
Programming
Proxy
Python
Red-black tree
Regular Expression
scanf
Semantic Web
so
SSH
STL
SVN
Terminal
Ubuntu
UNIX
VC
Vim
vimrc
VirtualBox
Win32 API
Windows
WScript
wsf
文件关联
iCoder.ME
C, C++, Emacs lisp and more…
Mac OS X下编译安装带debugger的bochs
2011/02/25
Posted by on bochs支持两种方式的debugger:(1)自带的debugger(internal debugger); (2)使用gdb-stub方式来debug.
但是这两种方式不兼容,编译的时候只能选其一.
下面介绍如何在Mac OS X上编译安装带有debugger的bochs:
直接修改配置文件:.conf.macosx
在CFLAGS、LDFLAGS、CXX里增加”-arch i386 -m32″.
完整写法如下:
set echo CFLAGS="-arch i386 -m32 -pipe -O3 -I/sw/include -fomit-frame-pointer -finline-functions -falign-loops=16 -falign-jum\ ps=16 -falign-functions=16 -falign-labels=16 -falign-loops-max-skip=15 -falign-jumps-max-skip=15 -fprefetch-loop-arr\ ays $CFLAGS" CPATH="/sw/include" CPPFLAGS="" CXXFLAGS="$CFLAGS" LDFLAGS="-arch i386 -m32 -L/sw/lib" CXX="g++ -arch i386 -m32" export CFLAGS export CPATH export CPPFLAGS export CXXFLAGS export LDFLAGS export CXX
然后在./configure里增加”–enable-gdb-stub”或”–enable-debugger –enable-disasm”.
生成makefile: sh .conf.macosx
编译:make
简单说下,如果不加-arch i386 -m32 在64位Mac下会编译失败,google了下,说的原因是由于虽然系统是64位的,但Carbon库只有3\
2位的因此导致不兼容.
are you sure the compiled bochs really can work? or only complied
Yes, it works for me very well.
Have you “make install”? It will install some needed files in your install-path. Then you can run either “bochs.app” in GUI or “bochs.app/Contents/MacOS/bochs” in Terminal.
你好 我按照你的方法编译bochs 编译通过了 生成了bochs.app 但是每次运行都报错意外退出 不知道是怎么回事?我记得我好像在一个文档上面看说MAC OSX版本的 bochs需要一些额外的库还是什么 官方文档我也看了 没有找到有用的信息 我这边用make install倒是下载了一个叫dlxlinux4.tar.gz的东西 但是下载完成后的步骤就报错了 请问我在make了以后还需要做什么 编译这个具体过程中还有哪些步骤?多谢~
实在抱歉 我又仔细的对比了一下.conf.macosx的内容 发现我有几句话遗漏了 现在已经可以运行了 非常感谢你的文章