Coredump Decode
来源:互联网 发布:写剧本的软件 编辑:程序博客网 时间:2024/06/08 01:18
This is a summary of decoding Linux userspace process corefiles using GDB.
- Preparation
- Decode
- Examples
- Example 1 - Buffer overflow
- Example 2 - Busybox crash
- Example 3 - String race condition
Preparation
To decode the corefile, both gdb and unstripped binary are necessary.
Get the corresponding GDB for target corefile. The GDB must match with the target executables. This is especially important for corss-platform compilers.
Find the unstripped binary - the unstripped binary contains the symbols of the coredumped process. To check for the debug info in a binary, either
objdump
orreadelf
can be used. Sometimes even thefile
command can tell the difference.
Decode
The basic command to decode corefile is
`gdb <unstripped_binary> <corefile>`.
If you have all shared libraries at hand, they can be automatically loaded by command
`gdb <unstripped_binary> -q -ex "set solib-search-path <lib1>:<lib2>:...:<libn>" <corefile>`.
To check for loaded/needed shared libraries, gdb command info sharedlibrary
can be used. To load multiple shared libaries, you can use gdb command set solib-search-path <lib1>:<lib2>:...:<libn>
, where libn
is the path to the shared libary. Colon(:) can be used to concatenate multiple paths.
- Coredump Decode
- coredump
- Coredump
- coredump
- coredump
- coredump
- coredump
- coredump
- coredump
- coredump
- coredump
- coredump
- coredump
- decode
- decode
- decode
- DECODE
- decode
- 怎样发布程序
- EasyUI 基础组件
- Android开发 HTTP 发送 Post 与 Get 请求
- Android ndk class file for android.support.v7.app.AppCompatActivity not found
- iOS开发支付集成之支付宝支付
- Coredump Decode
- 生命的密码 —— DNA
- jQuery ajax
- Leetcode题解 278. First Bad Version
- iOS开发支付集成之微信支付
- SQL Server数据库数据清理常用命令
- Android中各种Span的用法
- 隐式游标
- Best Time to Buy and Sell Stock II