在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 ?? ()
这时ARM板上的信息应该是这样的:
[root@51Board usb]# ./gdbserver 192.168.0.29:1234 arm0702_8.out
Process arm0702_8.out created; pid = 228
Remote debugging from host 192.168.0.29
现在就已经建立其了PC机通ARM板山的连接了。
那么我们就可以像调试本地程序一样调试ARM板上程序。
例如:
(gdb) list
19 //#include "cmaininterfacewidget.h"
20 //#include "headers.h"
21
22 #include "cwidgetmanager.h"
23 #define _DEBUG_
24 #define _DEBUGCDatabase_
25
26 int main( int argc, char ** argv )
27 {
28 QApplication app( argc, argv );
(gdb) break 28
Breakpoint 1 at 0xf25c: file main.cpp, line 28.
(gdb) target remote 192.168.0.50:1234
Remote debugging using 192.168.0.50:1234
0x4011dc30 in ?? ()
Error while mapping shared library sections:
/usr/qpe/lib/libts-0.0.so.0: 没有那个文件或目录.
Error while mapping shared library sections:
/usr/qpe/lib/libqwt.so.4: 没有那个文件或目录.
Error while mapping shared library sections:
/usr/qpe/lib/libsqlite3.so.0: 没有那个文件或目录.
Error while mapping shared library sections:
/usr/qpe/lib/libsqlitedataset.so.0: 没有那个文件或目录.
Error while mapping shared library sections:
/usr/qpe/lib/libqte.so.2: 没有那个文件或目录.
Error while mapping shared library sections:
/lib/libstdc++.so.5: 没有那个文件或目录.
Error while mapping shared library sections:
/usr/qpe/lib/variance.so: 没有那个文件或目录.
Error while mapping shared library sections:
/usr/qpe/lib/dejitter.so: 没有那个文件或目录.
Error while mapping shared library sections:
/usr/qpe/lib/linear.so: 没有那个文件或目录.
Error while reading shared library symbols:
/usr/qpe/lib/libts-0.0.so.0: 没有那个文件或目录.
Error while reading shared library symbols:
/usr/qpe/lib/libqwt.so.4: 没有那个文件或目录.
Error while reading shared library symbols:
/usr/qpe/lib/libsqlite3.so.0: 没有那个文件或目录.
Error while reading shared library symbols:
/usr/qpe/lib/libsqlitedataset.so.0: 没有那个文件或目录.
Error while reading shared library symbols:
/usr/qpe/lib/libqte.so.2: 没有那个文件或目录.
Error while reading shared library symbols:
/lib/libstdc++.so.5: 没有那个文件或目录.
Error while reading shared library symbols:
/usr/qpe/lib/variance.so: 没有那个文件或目录.
Error while reading shared library symbols:
/usr/qpe/lib/dejitter.so: 没有那个文件或目录.
Error while reading shared library symbols:
/usr/qpe/lib/linear.so: 没有那个文件或目录.
(gdb) quit
上面的那些错误是因为在ARM上指定路径有的库文件在PC上没有而引起的。
分享到:
相关推荐
GDB 在arm开发板上的远程调试 GDB 在arm开发板上的远程调试 GDB 在arm开发板上的远程调试 GDB 在arm开发板上的远程调试
windows gdb arm 7.11
1 交叉编译gdb 2 gdbserver 使用
远程调试UI(DDD与Insight)安装使用\ARM的GDB
以ARM开发板为例详细介绍QT远程调试环境搭建过程。包括搭建网络,挂载NFS,建立OpenSSH, GDB编译以及QT远程调试设置。
网上关于ARM下串口调试代理实现机理的文章资源少之又少,该文章有些微参考价值,供大家分享。
通过gdb-7.12源码交叉编译生成的可执行文件,用于在Linux主机上对arm-Linux开发板进行远程调试。
【摘要】:本文首先介绍了gdb+gdbserver相关的概念,然后介绍了其下载、编译、安装等过程;接着介绍了利用gdb+gdbserver调试应用程序的流程及实例等;... <br>【关键词】:gdb,gdbserver,远程调试
mingw32编译的在windows上运行arm和mips架构的gdb,方便在windows上远程调试单板上的gdbserver
简介 前提条件: 确保本机已经安装 VS Code。... Arm:海思 3559A (已配置好编译工具链和 gdb server) 连接远程主机 Remote Development 首先安装 Remote Development 插件,安装完成之后: 如上图所示,输入:Remote
通过gdb-7.12源码交叉编译生成的可执行文件,用于在Linux主机上对arm-Linux开发板进行远程调试。
arm-linux-gdb 远程调试工具。
eclipsecdt与arm-linuc-gdb,gbdserver配合实现远程调试。含有dropbear,vfstp,openssh安装教程。
远程调试ARM Cortex目标: 关于从主机PC上运行的gdb到远程目标Mbed LPC1768(ARM Cortex M3)的目标“步进”命令传播的案例研究。 该报告包括以下组成部分的简要研究: gdb的体系结构和内部远程串行协议Python OCD ...
摘 要:对于嵌入式系统开发来说,远程调试器非常重要,而GDB RSP协议与USB通信一般在嵌入式调试系统中占有重要位置。文章在研究GDB RSP协议与USB通信的基础上,针对ZW100 DSP处理器的体系架构,给出了一种基于RSP...
gdb7.11 host=i686-w64-mingw32 target=arm-linux 可以用来远程调试,有需要的就下载吧。
ARM linux远程调试图形界面DDD工具
1. 远程调试环境的搭建原理 2. 使用GDB 3. Linux内核调试 4. 实验 实验一:利用GDB进行本地调试 实验二:利用GDB进行远程调试 实验三:arm-linux内核调试
在Teensy和GDB支持上进行实时调试 费尔南多·特里亚斯(Fernando Trias),2020年6月 该模块无需外部调试接口即可从PJRC为Teensy 3.x和4.x平台提供断点支持。 该模块提供: GDB远程串行协议存根,以便GDB可以连接到...