这个看起来很牛逼啊!
-------- Original Message --------
Subject: A cscope-like gcc plugin
Date: Wed, 5 Dec 2012 17:14:57 +0800
From: Yunfeng ZHANG <
zyf.z...@gmail.com>
To:
g...@gcc.gnu.org
Newsgroups: gmane.comp.gcc.devel
Hi all:
I'm pleased to announce my gcc plugin on gcc-4.6.3 has been released, it
collects data from gcc compilation stage and dump them to sqlite-database just
like cscope, but with later enhancement.
1) Function alias. To linux, later code often makes you confusion.
f_ops fs = { .open = ext2_open, };
void foo(void)
{
fs.open = ext2_open;
...
fs.open(); // << which function will be called, where is it?
}
The feature treats `ext2_open' as an alias of `open'. So when you search
`open', jump to `ext2_open'. Of course, you can get `ext2_open' is called by
`foo' reversely.
2) Whether current line is skipped by `#ifdef/#if'.
3) Extract defintion beyond macro tokens.
Tested projects are mainly linux-2.6.35 (mips). Other source compiled include
gcc-4.6.3, glibc-2.13, gdb-7.4 of mips, qemu-1.1.1 of x86.
Go from doc.txt of attachment, or
http://gccsymdb.googlecode.com/svn/tags/v3/.
Yunfeng Zhang