如何查看内核中结构?
有什么简单工具或者什么接口,可以观察内核中得结构 task_struct,mm_struct,vma_area_struct?要简单一些?网上的一些方法,我感觉都太复杂,有些还要编译内核,有没有简单一些的? lxr.free-electrons上搜索? http://linux.die.net/man/8/crash
如果会用一些trace32 simulator,或者kernel dump等工具,内核数据就随你解剖了 本帖最后由 Buddy_Zhang1 于 2015-12-23 19:28 编辑
#include <asm/current.h>
#include <linux/sched.h>
struct task_struct *task;
struct mm_struct *mm;
struct vm_area_struct *vma;
task = current;
mm = task->mm;
vma = mm->mmap;
我调试虚拟内存的时候就是使用这些代码来获取 task_struct ,mm_struct ,vm_area_struct 的 我都是在sourceinsight中看源码的,这个查找结构体,函数,文件换算可以。不知道会不会有高大上的工具 看源码还是 sourceinsight 最好,可惜只有 windows 版,
linux wine 也可以,但是感觉体验还是没有windows好
页:
[1]