嵌入式linux下core文件分析
2021/11/17 7:11:49
本文主要是介绍嵌入式linux下core文件分析,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
配置core文件生成
# ulimit -c unlimited # echo "/var/core-%e-%p-%t" > /proc/sys/kernel/core_pattern # cat /proc/sys/kernel/core_pattern /var/core-%e-%p-%t
生成的core
# ls /var/core-dump-1063-991181935
core分析
# arm-none-linux-gnueabi-gdb a.out GNU gdb (Sourcery G++ Lite 2011.03-41) 7.2.50.20100908-cvs Copyright (C) 2010 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=i686-pc-linux-gnu --target=arm-none-linux-gnueabi". For bug reporting instructions, please see: <https://support.codesourcery.com/GNUToolchain/>... Reading symbols from /mnt/hgfs/build/a.out...done. (gdb) (gdb) set solib-search-path /home/rootfs/lib (gdb) info sharedlibrary From To Syms Read Shared Object Library 0x401d501c 0x401e6f64 Yes (*) /home/rootfs/lib/libgcc_s.so.1 0x40206c00 0x402ffb5c Yes (*) /home/rootfs/lib/libc.so.6 0x4007e7d0 0x40098f58 Yes (*) /home/rootfs/lib/ld-linux.so.3 (*): Shared library is missing debugging information. (gdb) core-file /home/core-dump-1063-991181935 warning: exec file is newer than core file. [New LWP 1063] Reading symbols from /home/rootfs/lib/libgcc_s.so.1...(no debugging symbols found)...done. Loaded symbols for /home/rootfs/lib/libgcc_s.so.1 Reading symbols from /home/rootfs/lib/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /home/rootfs/lib/libc.so.6 Reading symbols from /home/rootfs/lib/ld-linux.so.3...(no debugging symbols found)...done. Loaded symbols for /home/rootfs/lib/ld-linux.so.3 Core was generated by `./dump'. Program terminated with signal 11, Segmentation fault. #0 0x4026e854 in memcpy () from /home/rootfs/lib/libc.so.6 (gdb)
这篇关于嵌入式linux下core文件分析的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-12如何创建可引导的 ESXi USB 安装介质 (macOS, Linux, Windows)
- 2024-11-08linux的 vi编辑器中搜索关键字有哪些常用的命令和技巧?-icode9专业技术文章分享
- 2024-11-08在 Linux 的 vi 或 vim 编辑器中什么命令可以直接跳到文件的结尾?-icode9专业技术文章分享
- 2024-10-22原生鸿蒙操作系统HarmonyOS NEXT(HarmonyOS 5)正式发布
- 2024-10-18操作系统入门教程:新手必看的基本操作指南
- 2024-10-18初学者必看:操作系统入门全攻略
- 2024-10-17操作系统入门教程:轻松掌握操作系统基础知识
- 2024-09-11Linux部署Scrapy学习:入门级指南
- 2024-09-11Linux部署Scrapy:入门级指南
- 2024-08-21【Linux】分区向左扩容的方法