Ubuntu 16.04安裝Insight實現匯編的調試


由於Ubuntu從9.04開始就把Insight從APT源中刪除,所以使用APT無法安裝,而且《Assembly Language Step By Step, for Linux!》此書講解的例子也正是使用Insight。

網上流傳的安裝方法通過修改頭文件或者源碼文件的方式進行源碼的安裝基本都不湊效,下面是正確的安裝方法:

1、安裝依賴

sudo apt-get install autoconf
sudo apt-get install autogen
sudo apt-get install texinfo
sudo apt-get install zlib1g-dev
sudo apt-get install tcl-dev
sudo apt-get install tk-dev
sudo apt-get install mesa-common-dev
sudo apt-get install libjpeg-dev
sudo apt-get install libtogl-dev
sudo apt-get install python-dev
sudo apt-get install flex
sudo apt-get install bison
sudo apt-get install itcl3
sudo apt-get install itk3
sudo apt-get install iwidgets4

提示:按順序安裝。

2、克隆最新源碼

git clone --recursive git://sourceware.org/git/insight.git

提示:由於網速比較慢,基本需要3個小時。離線版本:(鏈接: https://pan.baidu.com/s/1qXEjMMw 密碼: 6upw)

3、運行autoconf

cd insight
autoconf

4、創建insight.sh,內容如下:

gedit insight.sh
./configure --prefix=/usr/. \
--libdir=/usr/lib64 \
--disable-binutils \
--disable-elfcpp \
--disable-gas \
--disable-gold \
--disable-gprof \
--disable-ld \
--disable-rpath \
--disable-zlib \
--enable-sim \
--with-gdb-datadir=/usr/share/insight \
--with-jit-reader-dir=/usr/lib64/insight \
--with-separate-debug-dir='/usr/lib/debug' \
--with-expat \
--with-python \
--without-libunwind

5、設置權限

chmod +x insight.sh

6、運行insight.sh

./insight.sh

7、運行make

make

8、安裝

sudo make install

 

參考:

http://www.dalfonso.co/2016/04/23/setting-insight-debugger-on-ubuntu-16-04-lts/(以上方法來此此篇文章)

http://www.duntemann.com/assembly.html

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM