linux dumpcore (imx6)

https://developer.toradex.com/knowledge-base/enable-and-analyze-coredumps-in-linux

https://linux-audit.com/understand-and-configure-core-dumps-work-on-linux/

打开imx的系统dumpcore日志并分析日志文件找到崩溃的代码行
 

ulimit -H -c 8192
ulimit -S -c 8192
echo 1 > /proc/sys/kernel/core_uses_pid
echo "/data/core-%e-%s-%u-%g-%p-%t" > /proc/sys/kernel/core_pattern

分析dumpcore日志 ,使用交叉编译工作提供的gdb, XXX为交叉编译环境根目录

YYY为dumocore日志路径,ZZZ为debug的可执行文件路径

cross-gdb -ex 'set sysroot XXX' -ex 'core-file YYY' ZZZ

../x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb -ex 'set sysroot .' -ex 'core-file ~/git_new/ledvance_professional_gateway_imx6ull/gateway-EU/Debug/core-gateway-EU-11-0-0-9133-1620442475' ~/git_new/ledvance_professional_gateway_imx6ull/gateway-EU/Debug/gateway-EU

GNU gdb (GDB) 8.0.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=x86_64-pokysdk-linux --target=arm-poky-linux-gnueabi".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/gateway/git_new/ledvance_professional_gateway_imx6ull/gateway-EU/Debug/gateway-EU...done.
[New LWP 9167]
[New LWP 9133]
[New LWP 9142]
[New LWP 9143]
[New LWP 9144]
[New LWP 9146]
[New LWP 9147]
[New LWP 9148]
[New LWP 9150]
[New LWP 9151]
[New LWP 9152]
[New LWP 9169]
[New LWP 9168]
warning: Could not load shared library symbols for /lib/libstdc++.so.6.
Do you need "set solib-search-path" or "set sysroot"?
Core was generated by `./gateway-EU'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  memcpy () at ../sysdeps/arm/armv7/multiarch/memcpy_impl.S:473
473    ../sysdeps/arm/armv7/multiarch/memcpy_impl.S: No such file or directory.
[Current thread is 1 (LWP 9167)]

killall -SIGSEGV gatewway-EU   终止进程并给它传递一个SIGSEGV信号
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值