加入收藏 | 设为首页 | 会员中心 | 我要投稿 云计算网_泰州站长网 (http://www.0523zz.com/)- 视觉智能、AI应用、CDN、行业物联网、智能数字人!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

使用Gdb对ARM板上的程序进行远程调试

发布时间:2016-01-24 14:35:35 所属栏目:Linux 来源:网络整理
导读:在arm板上运行 gdbserver [root@51Board usb]# ./gdbserver 192.168.0.29:1234 arm0702_8.out Process arm0702_8.out created; pid = 228 从服务器中等待一个请

在arm板上运行 gdbserver

[root@51Board usb]# ./gdbserver 192.168.0.29:1234 arm0702_8.out

Process arm0702_8.out created; pid = 228

从服务器中等待一个请求

这个是对qte程序的调试,先运行程序再调试进程号。在PC机上程序名称一样的。

// ./gdbserver 192.168.0.29:1234 --attach 545

说明:

这里的192.168.0.29是上位PC机的IP(这个应该于ARM板上的IP在一个网段内)

1234这里规定的端口号,等下要用到的,当然这个也可以用其他的端口号

Arm0702_8.out

上位PC机运行 arm-linux-gdb 调试程序

[root@zieckey collieryMainSrc02]# arm-linux-gdb arm0702_8.out

GNU gdb 5.3

Copyright 2002 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB. Type "show warranty" for details.

This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-linux"...

(gdb)

上位PC机连接到ARM板

[root@zieckey collieryMainSrc02]# arm-linux-gdb arm0702_8.out

GNU gdb 5.3

Copyright 2002 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type "show copying" to see the conditions.

There is absolutely no warranty for GDB. Type "show warranty" for details.

This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-linux"...

(gdb) target remote 192.168.0.50:1234

Remote debugging using 192.168.0.50:1234

0x40001550 in ?? ()

(编辑:云计算网_泰州站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读