使用crash工具根据地址查看结构体的内容时,有时需要输入struct或者union,多少有些繁琐,crash提供了*
命令,直接跟在结构体或者联合体的名字的前面即可。
示例:
- 带struct
crash> struct kmem_cache -x ffff893751f60800
struct kmem_cache {
cpu_slab = 0x5fc135c77b40,
flags = 0x40000000,
min_partial = 0x5,
size = 0x60,
- 不带struct
crash> *kmem_cache -x ffff893751f60800
struct kmem_cache {
cpu_slab = 0x5fc135c77b40,
flags = 0x40000000,
min_partial = 0x5,
size = 0x60,
标签:partial,struct,union,kmem,cache,crash
From: https://www.cnblogs.com/pengdonglin137/p/17724799.html