在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 ?? ()