Crash Tool
Crash tools is a GNU opensource tool which focus on analyzing kernel structures, it also have many powerful extension plugins that can be used.
The output window is like following:
https://crash-utility.github.io/crash_whitepaper.html
https://github.com/lkml-likexu/kde/issues/65
cmd:
./crash …/vmlinux --kaslr=0x2756e00000 --machdep kimage_voffset=0xffffffe6bee00000 …/ramdump/DDRCS0_0.BIN@0x80000000,…/ramdump/DDRCS1_0.BIN@0x800000000,…/ramdump/DDRCS1_1.BIN@0x880000000 --machdep vabits_actual=xx
help : mod help
log/dmesg: 打印出故障现场的kmsg缓冲区log_buf中的内容。
struct:展示结构体的定义,或者从指定的地址开始解析一个结构体。
union:与struct类似,但是用于union的展示
p:print查看某个变量的值,实际上是调用gdb的p命令
whatis:展示结构体、联合体等定义
bt :展示调用堆栈信息,如果不加参数那么就可以利用SP和FP进行栈回溯打印;
-T显示一个进程从thread_info以上一直到堆栈底部的所有symbol信息,一般比不加参数打印出的信息更多;
-a显示所有active task的堆栈信息。
ps:展示系统中的进程状态,和正常系统运行时的ps命令类似
task <pid>:展示某个pid的task_struct内容,不加pid则表示当前进程
dis <address> :反汇编命令,-l可以展示源代码行。
mount:展示当前挂载的文件系统的命令
net:展示网络相关的信息
rd <address>: read memory操作,读取一个地址处的内容
file <pid>:查看某一个进程中的所有打开的文件
search -t <value/symbol>:在所有进程的stack页面中查找一个value或者一个symbol,并打印出来结果