A cscope-like gcc plugin

Yunfeng ZHANG zyf.zeroos@gmail.com
Wed Dec 5 09:15:00 GMT 2012


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: symdb.tgz
Type: application/x-gzip
Size: 128901 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20121205/2ee6997e/attachment.bin>


More information about the Gcc mailing list