免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1685 | 回复: 0
打印 上一主题 下一主题

用gdb 跟踪ARM-Linux 大型程序的段错误 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-23 03:03 |只看该作者 |倒序浏览
Andrew Huang <bluedrum@163.com> 转载请注明作者及出处

1.由于两个程序占用内存过大 利用应用程序后台运行 ,使用gdb跟踪

 

./dosbox &  # &:后台运行

2.程序运行后使用ps查看系统进程号

1134 root     44368 S <  ./dosbox

3.使用gdb 跟踪pid进程号

 

Gdb –pid=1134

4

出现段错误时候  使用bt命令出现如下信息  排错

Program received signal SIGSEGV, Segmentation fault.

CBindGroup::ActivateBindList (this=<value optimized out>, list=0x1edba08,

    value=32767, ev_trigger=true) at sdl_mapper.cpp:1244

1244    sdl_mapper.cpp: No such file or directory.

        in sdl_mapper.cpp

(gdb) bt

#0  CBindGroup::ActivateBindList (this=<value optimized out>, list=0x1edba08,

    value=32767, ev_trigger=true) at sdl_mapper.cpp:1244

#1  0x000f4c4c in CKeyBindGroup::CheckEvent (this=0x1ebff68, event=0xbef0774c)

    at sdl_mapper.cpp:502

#2  0x000eb494 in MAPPER_CheckEvent (event=0x0) at sdl_mapper.cpp:2155

#3  0x000e6cd0 in GFX_Events () at sdlmain.cpp:1423

#4  0x0000cef8 in Normal_Loop () at dosbox.cpp:142

#5  0x0000cdc8 in DOSBOX_RunMachine () at dosbox.cpp:244

#6  0x00017988 in CALLBACK_RunRealInt (intnum=0 '\0') at callback.cpp:106

#7  0x001e57ac in DOS_Shell::Execute (this=<value optimized out>,

    name=<value optimized out>, args=<value optimized out>)

    at shell_misc.cpp:492

#8  0x001e2ce0 in DOS_Shell::DoCommand (this=0x1ee1128, line=0xbef099c3 "")

    at shell_cmds.cpp:153

#9  0x001db3fc in DOS_Shell::ParseLine (this=0x1ee1128,

    line=0xbef099b8 "ALADDIN.EXE") at shell.cpp:251

#10 0x001dca60 in DOS_Shell::Run (this=0x1ee1128) at shell.cpp:323

#11 0x001dbff8 in SHELL_Init () at shell.cpp:653

#12 0x001d2670 in Config::StartUp (this=0x0) at setup.cpp:853

^C#13 0x000ea4f0 in main (argc=<value optimized out>Quit

 

void MAPPER_CheckEvent(SDL_Event * event) {

 

       printf("hxy %s:event %x\n",__FUNCTION__,event);

       if(event == NULL)

              return ;

      

       for (CBindGroup_it it=bindgroups.begin();it!=bindgroups.end();it++) {

              if ((*it)->CheckEvent(event)) return;

       }

}

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP