嵌入式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-12-18git仓库有更新,jenkins 自动触发拉代码怎么配置的?-icode9专业技术文章分享
- 2024-12-18Jenkins webhook 方式怎么配置指定的分支?-icode9专业技术文章分享
- 2024-12-13Linux C++项目实战入门教程
- 2024-12-13Linux C++编程项目实战入门教程
- 2024-12-11Linux部署Scrapy教程:新手入门指南
- 2024-12-11怎么将在本地创建的 Maven 仓库迁移到 Linux 服务器上?-icode9专业技术文章分享
- 2024-12-10Linux常用命令
- 2024-12-06谁看谁服! Linux 创始人对于进程和线程的理解是…
- 2024-12-04操作系统教程:新手入门及初级技巧详解
- 2024-12-04操作系统入门:新手必学指南