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在设备端运行文件较大

gdb移植(交叉版本)的更多相关文章

  1. arm-linux的gdb移植

    转载于:http://blog.chinaunix.net/uid-23381466-id-309369.html arm-linux的gdb移植分为两种情况.一种是交叉调试版.这一种模式是需要编译一 ...

  2. gdb移植(设备端本地版本)

    Gdb下载地址:http://ftp.gnu.org/gnu/gdb/ ncurse下载地址:http://ftp.gnu.org/pub/gnu/ncurses/ 目录结构如下: ├── insta ...

  3. 记录一个glibc 导致的段错误以及gdb 移植

    上一篇我有相关关于一个段错误的记录,现在记录当时的段错误具体是在哪里的. // 从 GNU 的官网下载当前在使用的 glibc 的源代码以及最新的 glibc 源代码 // 地址如下: http:// ...

  4. 物联网操作系统Hello China移植mile stone之一:移植基础版本V1.76发布

    Hello China V1.76版发布,这是向ARM系列CPU移植的基础版本.相对V1.75版,该版本主要做了如下的一些调整: 1.  通过宏定义的方式对内核实现了模块化,开发者可以通过开启或关闭预 ...

  5. c/c++gdb下和发布版本下输出地址不同

    相差4字节 相差8个字节 原因: 这4个字节是优化掉了,64位操作系统,函数传参通过寄存器,减少了栈的使用 debug模式下,abc的地址都存下来了.

  6. cocos2dx android版本移植时的Error format not a string literal and no format arguments解决方案

    原文地址 : http://www.cnblogs.com/hhuang2012/p/3336911.html cocos2dx android版本移植时的Error format not a str ...

  7. 搭建交叉调试环境 arm-linux-gdb配合gdbserver

        在嵌入式开发中,有时候需要进行源码级别的调试,可以设置断点,单步执行,相比于每步打印printf或者printk来说,更加友好.下面就来介绍这种调试方法.     gdb交叉调试类似于网络浏览 ...

  8. 【嵌入式开发】 嵌入式开发工具简介 (裸板调试示例 | 交叉工具链 | Makefile | 链接器脚本 | eclipse JLink 调试环境)

    作者 : 韩曙亮 博客地址 : http://blog.csdn.net/shulianghan/article/details/42239705  参考博客 : [嵌入式开发]嵌入式 开发环境 (远 ...

  9. Linux下交叉编译gdb和gdbserver

    平台:tq2440 GCC:  gcc version 4.3.3 (Sourcery G++ Lite 2009q1-176) 这里过程中参考了下面两篇博文: http://blog.csdn.ne ...

随机推荐

  1. CPU结构及段地址偏移地址的概念

    原文地址:http://blog.csdn.net/yihuiworld/article/details/7533335#comments 程序如何执行: CPU先找到程序在内存中的入口地址 -- 地 ...

  2. codeforces316E3

    Summer Homework CodeForces - 316E3 By the age of three Smart Beaver mastered all arithmetic operatio ...

  3. Linux长格式文件属性介绍

    长格式文件属性 查看长格式文件命令:ll (或ls -l) (1)-:文件类型 -:普通文件 d:目录 b:块设备文件(随机读取) c:字符设备文件(顺序读取) p:管道文件 s:Socket套接字文 ...

  4. Windows 10 共享需要网络凭据的问题

    如果Windows在资源管理器的网络中双击其他的网络设备,提示要输入网络凭据的解决办法: 打开"网络共享中心" -> "更改高级共享设置"->&qu ...

  5. buff/cache占用过高的问题

    工作记录 > /proc/sys/vm/drop_caches 默认是0,不清除缓冲区缓存和页面缓存 可用值 0 到 3 值越高系统上的程序会跑起来越慢 free -m 蛋疼的是这只是一次性的, ...

  6. mybatis sql不等于

    转载地址:    https://blog.csdn.net/weixin_40797576/article/details/78796028 select * from test where id& ...

  7. 用单元测试来调试SilverFish AI

    [TestFixture] public class AiTest { [Test] public void Test() { Settings.Instance.LogFolderPath = @& ...

  8. HSBToolBox

    HSBToolBox.exe Unzip all files to the folder where Hearthbuddy.exeThen just run HSBToolBox.exe [asse ...

  9. 限定某个业务控制方法,只允许GET或POST请求方式访问

    可以在业务控制方法前,指明该业务控制方法只能接收GET或POST的请求 @Controller @RequestMapping(value="/user") public clas ...

  10. Python多进程库multiprocessing创建进程以及进程池Pool类的使用

    问题起因最近要将一个文本分割成好几个topic,每个topic设计一个regressor,各regressor是相互独立的,最后汇总所有topic的regressor得到总得预测结果.没错!类似bag ...