生成core的调试方法

来源:互联网 发布:nginx反向代理配置视频 编辑:程序博客网 时间:2024/05/18 03:22
1. telnet到STB启动U盘listen
./hmw.sh


2. 
mount -o nolock -o proto=tcp 192.168.23.71:/home/qinshijun/liguowang/core /mnt/usb7
ulimit -c unlimited
echo /mnt/usb7/192-168-23-108-core-%e-%p-%t > /proc/sys/kernel/core_pattern


3. 
killall -11 hmw_start.elf 主动生成core


cp ../../../../../FullApp/BCM7405/lib/hmw/* lib/hmw/ 拷到对应的目录可以得到更多的调试信息


/home/qinshijun/liguowang/c20/Software/Release/C01LBGV01/EC2108Y/debug/fullapp/lib




766  cd ../Release/C01LBGV01/EC2108Y/
767  ls
768  cd debug/
769  ls -la
770  cd fullapp/
771  ls -la
772  sudo chmod 777 core.6584
773  mipsel-linux-gdb hmw_start.elf -c core.6584
774  cp ../../../../../FullApp/BCM7405/lib/hmw/* lib/hmw/ -af
775  mipsel-linux-gdb hmw_start.elf -c core.6584
776  cp ../../../../../FullApp/BCM7405/lib/hmw/* lib/hmw/ -af
777  ls -la
778  sudo chmod 777 core.6604
779  mipsel-linux-gdb hmw_start.elf -c core.6604 

780  pwd



查看所有线程堆栈
thread apply all bt full


[root@localhost ~]# cat .gdbinit
set solib-absolute-prefix /opt/EmbedSky/4.3.3/arm-none-linux-gnueabi
set solib-search-path /opt/EmbedSky/4.3.3/arm-none-linux-gnueabi/libc/armv4t/lib:/opt/EmbedSky/4.3.3/arm-none-linux-gnueabi/libc/armv4t/usr/lib

 

原创粉丝点击