gdb移植(交叉版本)
Gdb下载地址:
termcap下载地址:
http://ftp.gnu.org/gnu/termcap/
tar -zxvf termcap-1.3.1.tar.gz
1.编译termcap-1.3.1
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) 在gdb-7.6\gdb下可以找到gdb可执行程序,在gdb-7.6\gdb\gdbserver下可以找到gdbserver可执行程序,
将该gdb命令命名为arm-linux-gdb gdbserver命名为arm-linux-gdbserver
3、gdb交叉版本使用
设备IP:192.168.1.110
PCIP:192.168.1.5
a)设备端
./arm-linux-gdbserver 192.168.1.110:1234 hello
b)PC电脑端
arm-linux-gdb hello
c)进入gdb后远程到设备
target remote 192.168.1.110:1234
d)连接成功后
PC端提示:
Remote debugging using 192.168.1.110:1234
Malformed packet(b) (missing colon): ore:0;
Packet: 'T050b:00000000;0d:30edf4be;0f:b0f70040;thread:3cb;core:0;'
设备端提示:
Remote debugging from host 192.168.1.5
readchar: Got EOF
Remote side has terminated connection. GDBserver will reopen the connection.
Listening on port 1234
交叉版本GDB : arm-linux-gdbserver在设备端运行,gdb在PC端运行,arm-linux-gdbserver文件比较小,所以占用设备内存空间小
而本地版本GDB : arm-linux-gdb在设备端运行文件较大
最新文章
- 【原创分享·支付宝支付】HBuilder打包APP调用支付宝客户端支付
- WebForm session,cookies
- LVS三种工作方式八种算法
- 【leetcode】Longest Palindromic Substring (middle) 经典
- Dojo Tree设置默认选中项并且获得它
- Xplico
- 在Hadoop集群上,搭建HBase集群
- Paint.NET
- [技术] 如何正确食用cnblogs的CSS定制
- 常用典型的sql语句
- 死磕 java集合之TreeSet源码分析
- C#实现按键计算器功能2(增强版)
- 2019.03.28 bzoj3595: [Scoi2014]方伯伯的Oj(splay+map+set)
- python的一些内置模块
- Tomcat8 启动慢 Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [53,161] milliseconds
- 【bzoj3680】平衡点 模拟退火
- jmeter之beanshell取出需要参数,传递给下个请求
- Linux学习3-yum安装java和Tomcat环境
- 约瑟夫环(Joseph)的高级版(面向事件及“伪链表””)
- python的面向对象-面向对象设计