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…
Install GDB cross debugger for i386 ELF on Mac OS X
2010/05/05
Posted by on 1. Download and install gettext: [a]http://www.gnu.org/software/gettext/[/a]
2. Install i386-elf-gcc from MacPorts:
sudo port install i386-elf-gcc sudo port -f activate i386-elf-gcc
You may need to create some symbolic links:
cd /opt/local/bin sudo ln -s i386-elf-gcc-4.3.2 i386-elf-gcc sudo ln -s i386-elf-g++-4.3.2 i386-elf-g++
3. Download GDB: [a]http://www.gnu.org/software/gdb/download/[/a]
4. Configure and install GDB for i386-ELF:
./configure --prefix=/opt/local \ --program-prefix=i386-elf- \ --target=i386-elf \ --with-gmp=/opt/local \ --with-libelf=/opt/local \ --with-build-libsubdir=/opt/local make sudo make install
Then the i386-ELF GDB will be installed in /opt/local with program name i386-elf-gdb.
Note: option ‘–target=i386-elf’ specifies guest(target) type ‘i386 ELF’.