New feature (offsetof) has been implemented to my plugin. Consider you've got a memory address by hardware debug tool in Linux and make sure it refers to a variable of task_struct, now you need compute the address of tsk->mm, but it isn't easy since there're too much members before it struct task_struct { ... struct sched_entity se; ... struct mm_struct *mm, *active_mm; ... }; The feature will dump member offset and struct size to database. ./gs offsetof task_struct mm ./gs sizeof task_struct
Currently, it works on gcc 4.6.3 only. Attachment is from https://gccsymdb.googlecode.com/svn/trunk@43 or https://gccsymdb.googlecode.com/svn/tags/v4 Thanks for trying:) Yunfeng Zhang
symdb.gcc.tgz
Description: GNU Zip compressed data