Dave Anderson <anderson(a)redhat.com> writes:
> I see what you say. However, my usual usage of kmem is to get the
data
> address of object (I was thinking the most users are same usage).
>
> crash> kmem <pointer in stack>
> info for data address
>
> copy & paste <data address>
> crash> p *(struct inode *)<data address>
Why not copy-and-paste the address from <pointer in stack>? Or use "bt
-FF"
to get the kmem cache type, and skip using "kmem" entirely? ;-)
Yes, bt -FF helps much. However, the pointer in stack is address in
middle of object data in many times.
E.g. for ext4_inode_cache, "struct address_space *" is in stack. But
actual slab object is inode->i_mapping == ext4_inode_info.vfs_inode.i_data.
Or functions takes member of object, e.g., &object->list.
If there is easy way to get the object address from the field of object
address, it would be what I want.
Thanks.
--
OGAWA Hirofumi <hirofumi(a)mail.parknet.co.jp>