当前位置:网站首页>Crash使用
Crash使用
2022-06-10 05:21:00 【鑫鑫缺点金】
Crash使用
环境搭建
1.crash工具编译
sudo apt-get install libaio-dev libncurses5-dev zlib1g-dev liblzma-dev flex bison byacc m4 bison g++-multilib gcc-multilib lib32ncurses5-dev lib32z1-dev
2.安装termcap libary
1)下载termcap
wget http://ftp.gnu.org/gnu/termcap/termcap-1.3.1.tar.gz
2)解压
tar -zxv -f termcap-1.3.1.tar.gz
3)安装
cd termcap-1.3.1
./configure
3.下载crash源码
https://github.com/crash-utility/crash
https://github.com/crash-utility/crash.git
4.编译crash工具
cd crash-master/crash-master
make target=ARM64
sudo make install
5、如果需要回退代码
git reset --hard 0ab7ac3bea5deaa3da894247ffab9ef2433c1b9b
启动
根据环境搭建我们我门编译了crash可执行程序,共两个,一个是调试ARM的,一个是ARM64的,
看你调试的target是ARM还是ARM64,再决定用哪个,这里将调试的ARM的命名为carsh,将调试的ARM64的命名为crash64.
启动crash需要两个文件,一个是coredump(dump)这里是SYS_COREDUMP、一个是vmlinux(符号表)。
将vmlinux和SYS_COREDUMP放入crash可执行程序的同一目录中,启动:
crash vmlinux SYS_COREDUMP
结果如下
这时就可以输入各种调试命令了
常规调试
常用命令
crash使用GDB作为他的内部引擎,crash中的很多命令和语法都与GDB相同。如果曾经使用过GDB,就会发现crash并不是很陌生。
如果想获得crash 更多的命令和相关命令的详细说明,可以使用crash的内部命令help来获取:




命令拓展
扩展命令
crash支持拓展命令,具体看crash拓展命令的说明
两个有助于分析问题的命令
编译拓展命令库
在拓展命令的官网下载源码,放入crash源码里面的extensions目录,比如将trace.c放入extensions目录。
然后在crash源码目录下输入如下命令:
make extensions
编译好后,就会有so库生成,文件放在extensions目录,比如trace.so
使用拓展命令
进入到crash后,在crash命令行图展
extend <path-to> /xxx.so

crash即可支持对应的命令了。
独有功能-查看ftrace(下次在写)
边栏推荐
- 一些漂亮的js提示框
- 一文看懂蚂蚁BizStack 云原生开发和治理平台
- Wechat applet custom component - circular progress bar
- 微信手机端js小游戏踩方块源码
- 【创新文档技术解决方案】上海道宁为您提供涵盖整个文档起草生命周期的产品——Litera,帮助用户创建质量更高的文档
- 自定义Tooltips提示气泡Js插件
- Tutorial on using midway
- 2022年危险化学品生产单位安全生产管理人员操作证考试题库及答案
- 2022.5.28-----leetcode. one thousand and twenty-one
- Personnaliser le plug - in bulles JS prompt tooltips
猜你喜欢

【对话直播】图计算是下一个科技前沿

Methods of using variables in shell parameters

Wechat mobile JS small game stepping on the box source code

js微信小游戏之打蚊子

2022年危险化学品生产单位安全生产管理人员操作证考试题库及答案

How to ensure system stability and achieve emission reduction? Ant group has these key technologies

How to use ODX to describe diagnostic sessions and security levels

Hevc HM learning 02

冒泡排序bubble_sort

BFS practice topic
随机推荐
Be diligent in making money abroad and talk about the importance of tasks
【对话直播】图计算是下一个科技前沿
跳高微信js小游戏源码
每日一题—LeetCode497—非重叠矩形中的随机点-前缀和-二分
Study notes for typescript
五项最优!蚂蚁集团通过信通院“稳保计划”最高级评测
JS wechat games - fighting mosquitoes
Understand ant bizstack cloud native development and governance platform
Chapter VI software testing tools (end of this chapter)
Interview question 08.01 Three step problem
[STM32] migration of guilite based on Hal Library
【無標題】
Record the realization of animation effect on the page of small rocket of BiliBili (station B)
Softing为艾默生提供AMS设备管理系统的连接解决方案
js微信小游戏之打蚊子
Power mathematics of leetcode326-3
2022山东省安全员C证考试题库及答案
New words new words new words new words new words new words
Literature reading -- location of regulatory variation in maize drought response and tolerance gene expression
Ant group's all-in-one privacy computing machine has obtained double certification, and 83 indicators meet the requirements