A cscope-like gcc plugin
Yunfeng ZHANG
zyf.zeroos@gmail.com
Wed Apr 10 06:04:00 GMT 2013
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: symdb.gcc.tgz
Type: application/x-gzip
Size: 41605 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20130410/1ee2eb81/attachment.bin>
More information about the Gcc
mailing list