gdb移植(裝置端本地版本)

2022-04-16 11:49:09 字數 1194 閱讀 9419

gdb

目錄結構如下:

├──install //

新建的安裝路徑

├──gdb-7.6

├──gdb-7.6.tar.bz2

├──ncurses-5.6

└──ncurses-5.6.tar.gz

解壓 tar -zxvf ncurses-5.6.tar.gz

解壓 tar -jxvf gdb-7.6.tar.bz2

mkdir -m 777 install

1.編譯ncurse 5.6

a)./configure --host=arm-linux --prefix=/home/jkf5773/workspace/gdb/gdb-2/install --without-ada --enable-termcap --with-shared

若是其他例如mips平台,則--host=mipsel-linux

b) make

c) make install

2.編譯gdb-7.6

a)./configure --host=arm-linux --enable-shared --prefix=/home/jkf5773/workspace/gdb/gdb-2/install --without-x --disable-gdbtk --disable-tui --without-included-regex --without-included-gettext ldflags="-l/home/jkf5773/workspace/gdb/gdb-2/install/lib" cppflags="-i/home/jkf5773/workspace/gdb/gdb-2/install/include"

若是其他例如mips平台,則--host=mipsel-linux

b) make

c) make install

d) 在install/bin下可以找到gdb可執行程式,檔案比較大,可以strip一下:arm-linux-strip -s gdb    在install/lib下可以找到libncurses.so庫檔案,複製到裝置的/lib目錄下,gdb需要這個庫檔案

件比較大,可以strip一下:arm-linux-strip -s gdb    在install/lib下可以找到libncurses.so庫檔案,複製到裝置的/lib目錄下,gdb需要這個庫檔案

關於Gdb工具的交叉編譯 移植

總結為了在arm linux處理器上捕捉程式異常,除錯程式,需使用gdb工具,需要將gdb原始碼使用交叉編譯工具編譯成為可在arm處理器上執行的格式。需要的工具為交叉編譯工具鏈arm none linux gnueabi gcc 本人使用的是4.3.2版本交叉工具鏈。編譯中需要的依賴庫有termca...

hostapd移植 2 7版本

1.openssl交叉編譯 選擇的版本是openssl 1.1.1.tar.gz 編譯出 openssl 2.libnl 交叉編譯 選擇的版本是libnl 3.2.25.tar.gz hostapd2.7的區別在於,libnl需要3.0以上版本的支援。具體選擇哪個版本的libnl可以配置hostap...

linux裝置驅動之串列埠移植

1 串列埠移植 s3c2440共有3個串列埠,在smdk2440平台上串列埠0和串列埠1都作為普通串列埠使用,串列埠2工作在紅外收發模式。tq2440開發板將它們都作為普通串列埠,目前所需要的只有串列埠0,作為控制終端,所以此處不作修改。在檔案 linux arch arm plat s3c24xx...