objdump调制

1.
进入源码目录
cd /mnt/usb/sda1/tv_mainpage-0.9.30/build

2.
执行命令
gdb -args ./tv_mainpage -qws -display directfb


3.查看对应的出错地址的代码list
(gdb) l *(0x407c6c)  
0x407c6c is in _GLOBAL__sub_I__ZN8SysProxy10m_instanceE() (../../../host/usr/mipsel-buildroot-linux-gnu/sysroot/usr/include/QtCore/qobject.h:113).
108    ../../../host/usr/mipsel-buildroot-linux-gnu/sysroot/usr/include/QtCore/qobject.h: No such file or directory.

list *(0x400850)





4.dump出二进制文件
查看地址
服务器上执行
mips-linux-gnu-objdump -d ./tv_mainpage >tv_mainpage.dump

5.vi tv_mainpage.dump
或者查找
grep -n -A 10 -B 10 "407c58" ./tv_mainpage.dump

定位地址然后往上找到头地址,查看对应的代码
176 00407c58 <_GLOBAL__sub_I__ZN8SysProxy10m_instanceE>:
  177   407c58:       27bdffd8        addiu   sp,sp,-40
  178   407c5c:       3c020045        lui     v0,0x45
  179   407c60:       3c060043        lui     a2,0x43
  180   407c64:       afb1001c        sw      s1,28(sp)
  181   407c68:       afb00018        sw      s0,24(sp)
  182   407c6c:       3c110045        lui     s1,0x45
 
 (gdb) l *(0x00407c58)
0x407c58 is in _GLOBAL__sub_I__ZN8SysProxy10m_instanceE() (../src/sysProxy.cpp:283).
278    
279    int SysProxy::getVolume()
280    {
281        int vol = SystemServiceGetVolume();
282        return vol;

283    }

 

 

6.命令行获取堆栈相关信息

打印pid进程所有线程的堆栈并退出。

 

gdb -ex "set pagination 0" -ex "thread apply all bt" -batch -p pid
kill -s SIGSEGV pid

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值