remote gdb
来源:互联网 发布:集群软件 编辑:程序博客网 时间:2024/05/21 07:02
Most of embedded devices have poor resources, such as memory, disk, and lack of some debug libraries.
So we use remote gdb, rather than directly gdb on device
1. download gdb source code:
http://ftp.gnu.org/gnu/gdb/2. untar source code:
'tar xvf gdb-7.3.tar.bz2'
3. build
1) build host gdb (gdb client)
a) 'cd gdb-7.3/'
b) './configure --prefix=/home/duan/arm-linux-gdb --target=arm-linux'
c) 'make'
=> arm-linux-gdb
d) 'make install'
2) build target gdb (gdb server)
a) 'cd gdb/gdbserver/'
b) './configure --prefix=/home/duan/arm-linux-gdb --target=arm-linux --host=arm-linux CC=/home/duan/arm-davinci-linux-gcc'
Note: set your own compile chain as CC value
c) 'make'
=> arm-linux-gdbserver
d) 'make install'
4. debug
1) environment
test program: hello
host ip: 192.168.1.100
target ip: 192.168.1.200
2) mount nfs dirctory to target board
'mount -t nfs -o nolock 192.168.1.100:/home/duan/nfs /mnt/nfs'
3) copy 'hello' executable program and arm-linux-gdbserver to nfs directory
4) run program on target board
'cd /mnt/nfs'
'./arm-linux-gdbserver 192.168.1.100:1234 hello'
5) gdb on host
/home/duanbb/arm-linux-gdb/bin/arm-linux-gdb hello
(gdb) target remote 192.168.1.200:1234
(gdb) b main
(gdb) c
Continuing.
Note: because program run on target, so can not use 'r' to run program, use 'c' to continue program
other commands are same as local gdb, such as 'l', 'p' and so on
- remote gdb
- remote gdb
- lldb/gdb remote protocol
- Remote debug error with GDB(remote register badly formatted)
- GDB Remote Serial Protocol —— RSP协议解析
- Cisco IOS 12.3(18) FTP Server Remote Exploit (attached to gdb)
- GDB远程调试错误解决 使用GDB 7.2版本进行远程调试时出现:Remote ‘g’ packet reply is too long错误
- GDB
- gdb
- GDB
- GDB
- gdb
- GDB
- Gdb
- GDB
- gdb
- gdb
- GDB
- Serial Communications in Win32
- 开发QQ桌球瞄准器(3):绘制瞄准线及母球
- 算法和数据结构
- ASP.net 4.0 routing IIS7.0 上部署
- telnet 代理远程登录
- remote gdb
- Sql ISNULL() 函数
- JDK中的URLConnection参数详解
- jquery各种取值操作
- C#合并时间段
- 传给native代码的触摸数据
- Hadoop常见问题及解决办法
- 开发QQ桌球瞄准器(4):透明度、颜色、线宽与母球大小
- JQuery中addClass()方法:注意