Re: crash extensions help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




----- Original Message -----
> Hi Dave,
> 
> I found you from https://www.redhat.com/mailman/listinfo/crash-utility.
> I was really impressed with your contribution to the crash utility.
> I tried subscribing to the crash utility mailing list. But no luck.

Sorry about that -- I was on vacation for a couple of weeks until today.
You're on the list now.

> 
> I started writing the crash extensions,
> I am unable to read the all the members of task_struct  and mm_struct structures.
> I am trying to read mm->hiwater_vm, the defs.h header file do not have
> struct_mm_hiwater_mm variable as a offset_table member.
> 
> Could you please suggest me the ways that I could read all the members of
> the task_struct and mm_struct.
> Thanks in Advance.
> 
> --
>   Thanks & Regards
>   Rupesh P

For structure members that are not in the built-in offset_table, you can just 
use MEMBER_OFFSET() directly, for example:

  MEMBER_OFFSET("mm_struct", "hiwater_rss")

which returns a long offset value.  But be aware that it returns -1 on a failure,
so you should check for success/failure before using the return value.

The built-in OFFSET() macro verifies that the the pre-initialized offset value
read by MEMBER_OFFSET() and stored in the offset_table is not a -1, and if it is, 
it will generate a FATAL error.  In an extension module, it's up to you to do the
verification.

Dave

 

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility



[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux