Linux 准确查找结构体定义位置
生活随笔
收集整理的這篇文章主要介紹了
Linux 准确查找结构体定义位置
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
例如:查找文件操作結構體 struct file_operations,
使用轉移符 "\"?
$?grep struct\ file_operations\ { kernel/include/ -rn
使用雙引號
$?grep "struct file_operations {" kernel/include/ -rn
?
下面這種方式,會查找到所有含有 file_operations 的結構體,包括定義,聲明,使用。
$?grep file_operations kernel/include/ -rn
下面這種方式,只會匹配struct,所以含有struct的都會顯示。
$?grep struct file_operations { kernel/include/ -rn
?
轉載于:https://www.cnblogs.com/lialong1st/p/8663699.html
總結
以上是生活随笔為你收集整理的Linux 准确查找结构体定义位置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: “兼亦竞腥膻”下一句是什么
- 下一篇: DB2数据库常用语句