在安装完DM365开发包后,接下就是要配置调试平台了,按照Debugging a Linux Application with MontaVista 5.0很容易就安装了GDB,但是命令行调试界面对习惯了WINDOWS下图形化调试界面是一件痛苦的事情接下来就Google图形化GDB,首先发现了DDD,当然我也知道insight,看了一个家伙的文章我决定安装DDD,但接下来的过程让人很痛苦,安装了Lesstif,motif,在安装了DDD,很兴奋的运行DDD但是却报了一个错误ddd: error while loading shared libraries: libXm.so.3: cannot open shared object file: No such file or directory为了这个错误googleN多的网页依然没一找到解决的方法,要么哪些安装包也找不到,无奈眼看要成功了却只能放弃,下载安装insight。出乎我的意料安装 insight却出人意料的成功,不过安装insight的时候要设置平台,命令我是参照安装gdb的命令,结果证明是成功的,具体命令如下:cd /insight-6.8-1在insight解压包目录下:
#./configure --host=i686-pc-linux-gnu --target=armv5tl-montavista-linux-gnueabi --prefix=/opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le #make && make install 安装成功后你会发现在/opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/bin目录下增加了一个armv5tl-montavista-linux-gnueabi-insight可执行文件运行armv5tl-montavista-linux-gnueabi-insight,就insight图形界面就出来了跟windows下的界面很想吧,安装gdbserver:#cd /gdb/gdbserver#CC=/opt/mv_pro_5.0/montavista/pro/devkit/arm/v5t_le/bin/arm_v5t_le-gcc ./configure --host=armv5tl-montavista-linux-gnueabi --prefix=/disk2/nfs#make &&install安装完发现在/disk2/nfs/bin增加了gdbserver后来测试发现,以前编译的gdbserver也可以用的,没什么区别,也就是说这步可以省略;调试测试:target#gdbserver 192.168.1.99:1000 ./sampleProcess ./sample created; pid = 850Listening on port 1000host#armv5tl-montavista-linux-gnueabi-insight出来上面的界面,设置一下通信接口,并打开sample文件target#Remote debugging from host 192.168.1.99readchar: Got EOFRemote side has terminated connection. GDBserver will reopen the connection.Listening on port 1000Remote debugging from host 192.168.1.9920+10=3020*10=20020/10=2Child exited with retcode = 0Child exited with status 0GDBserver exiting
