利用coredump定位出错的代码行
来源:互联网 发布:mac terminal 有趣 编辑:程序博客网 时间:2024/04/30 06:15
在Target机上操作:
1) ulimit -S -c unlimited > /dev/null 2>&1
2) 运行程序./panda_elf,发生异常生成core.13811
1) mipsel-linux-gdb -c core.13811 panda_elf
sep@debian:~/project$ mipsel-linux-gdb -c core.13811 panda_elf
GNU gdb 6.6.0.20070423-cvs
Copyright (C) 2006Free Software Foundation, Inc.
GDB is free software, covered by the GNU GeneralPublic License,and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type"show warranty" for details.
This GDB was configured as "--host=mipsel-linux --target=mipsel-linux-uclibc"...
warning: core file maynot match specified executable file.
Error while mapping shared library sections:
/lib/librt.so.0: No suchfile or directory.
Error while mapping shared library sections:
/lib/libdl.so.0: No suchfile or directory.
warning: .dynamic sectionfor "/lib/libpthread.so.0" isnot at the expected addr ess (wrong library or version mismatch?)
Error while mapping shared library sections:
/lib/libm.so.0: No suchfile or directory.
Error while mapping shared library sections:
/lib/libc.so.0: No suchfile or directory.
Error while mapping shared library sections:
/lib/ld-uClibc.so.0: No suchfile or directory.
Reading symbols from /opt/nfs/work/phase4.0git/apply/BSEAV/bin/libb_os.so...done.
Loaded symbols for ./libb_os.so
Reading symbols from /opt/nfs/work/phase4.0git/images/qte/lib/libQtGui.so.4...do ne.
Loaded symbols for ./lib/libQtGui.so.4
Reading symbols from /opt/nfs/work/phase4.0git/images/qte/lib/libQtNetwork.so.4...done.
Loaded symbols for ./lib/libQtNetwork.so.4
Reading symbols from /opt/nfs/work/phase4.0git/images/qte/lib/libQtCore.so.4...d one.
Loaded symbols for ./lib/libQtCore.so.4
Symbol file not foundfor /lib/librt.so.0
Symbol file not foundfor /lib/libdl.so.0
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /opt/nfs/work/phase4.0git/apply/BSEAV/bin/libstdc++.so.6... done.
Loaded symbols for ./libstdc++.so.6
Symbol file not foundfor /lib/libm.so.0
Reading symbols from /opt/nfs/work/phase4.0git/apply/BSEAV/bin/libgcc_s.so.1...d one.
Loaded symbols for ./libgcc_s.so.1
Symbol file not foundfor /lib/libc.so.0
Symbol file not foundfor /lib/ld-uClibc.so.0
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
Core was generated by `panda_elf
(gdb) where
#0 0x0048d558 in IpanelScreen::keyReleaseEvent()
#1 0x2af3d2ec in QWidget::event() from ./lib/libQtGui.so.4
#2 0x2aef8324 in QApplicationPrivate::notify_helper()
from ./lib/libQtGui.so.4
#3 0x2aefb178 in QApplication::notify() from ./lib/libQtGui.so.4
#4 0x2b4f062c in QCoreApplication::notifyInternal() from ./lib/libQtCore.so.4
#5 0x2af43468 in __dso_handle () from ./lib/libQtGui.so.4
warning: GDBcan't find the start of the function at 0x2af43468.
GDB is unable to find the start of the function at 0x2af43468
and thus can't determine the size of that function's stack frame.
This means that GDB may be unable to access that stack frame, or
the frames below it.
This problem is most likely caused by an invalid program counter or
stack pointer.
However, if you think GDB should simply search farther back
from 0x2af43468 for code which looks like the beginning of a
function, you can increase the range of the search using the `set
heuristic-fence-post' command.
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
(gdb)
#0 0x0048d558 in IpanelScreen::keyReleaseEvent ()
将panda_elf反汇编,用UE打开panda_elf.asm,找出地址48d558(去掉前面的零)所在的行,最后定位是一个全局变量没有加互斥保护。
- 利用coredump定位出错的代码行
- 利用MAP文件精确定位代码中出错的代码行
- 利用MAP文件精确定位代码中出错的代码行
- 利用MAP文件精确定位代码中出错的代码行
- 利用MAP文件精确定位代码中出错的代码行
- 如何利用crash report来定位出错的代码(Steps to analyze crash report from apple)
- 从堆栈快速定位出错的代码行
- C代码的coredump
- C代码的coredump
- 一次痛苦的Coredump定位过程
- 利用 GDB & Core Dump 来定位程序出错的位置
- [授权发表]如何快速定位 Linux Panic 出错的代码行
- iOS_Xcode如何准确定位到产生异常的出错代码
- iOS开发怎么定位问题出错的代码位置
- oozie sqoop 定位到出错的行
- iOS之让程序定位到出错代码行
- 引发Coredump的代码测试例子
- 一个与stl有关的概率coredump问题的定位
- swift_重载和自定义运算符
- Fuel PHP框架中的分页实现
- JQuery实现页面刷新后菜单保留鼠标点击addclass的样式
- 实现线性表的遍历查询插入删除合并
- iOS模块开发—登陆注册
- 利用coredump定位出错的代码行
- Hadoop初步使用:WordCount函数示例
- Java NIO使用及原理分析 (一)
- 《编写可读性代码的艺术》读书笔记 第二部分 简化循环和逻辑
- เล่นบาคาร่าแบบเดินสายได้ที่คาสิโนออนไลน์ของเรา
- 数学是成就卓越开发人员的必备技能
- 我的剪切板
- wertyu(简单的字符串处理问题)
- 响叮当小饭桌营养食谱秘诀之茶叶的妙用