Gdb下载地址:

http://ftp.gnu.org/gnu/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在设备端运行文件较大

最新文章

  1. 【原创分享·支付宝支付】HBuilder打包APP调用支付宝客户端支付
  2. WebForm session,cookies
  3. LVS三种工作方式八种算法
  4. 【leetcode】Longest Palindromic Substring (middle) 经典
  5. Dojo Tree设置默认选中项并且获得它
  6. Xplico
  7. 在Hadoop集群上,搭建HBase集群
  8. Paint.NET
  9. [技术] 如何正确食用cnblogs的CSS定制
  10. 常用典型的sql语句
  11. 死磕 java集合之TreeSet源码分析
  12. C#实现按键计算器功能2(增强版)
  13. 2019.03.28 bzoj3595: [Scoi2014]方伯伯的Oj(splay+map+set)
  14. python的一些内置模块
  15. Tomcat8 启动慢 Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [53,161] milliseconds
  16. 【bzoj3680】平衡点 模拟退火
  17. jmeter之beanshell取出需要参数,传递给下个请求
  18. Linux学习3-yum安装java和Tomcat环境
  19. 约瑟夫环(Joseph)的高级版(面向事件及“伪链表””)
  20. python的面向对象-面向对象设计

热门文章

  1. luogu 1373 小a和uim之大逃离 dp
  2. [Luogu] 引水入城
  3. 北京清北 综合强化班 Day3
  4. neo4j 一些常用的CQL
  5. windows 安装python2.7
  6. flask 部署
  7. iReport 3.7.6 jasperreport 生成PDF汉字不显示问题的解决
  8. DS博客作业04--树大作业
  9. MongDB的DateZone
  10. useMemo、useCallback简单理解