I've used several editors to work on large C applications. Many of them use ctags. The nice thing about ctags is that it works even on code that doesn't compile for some reason.
Many of these editors work by loading the ctags file into memory. That doesn't scale particularly well when you're dealing with several million lines of legacy. Other editors don't natively support ctags but do allow some sort of plug-in.
Etags is a variant of ctags data that also includes the text of the referenced line. That's handy when there are several definitions. It also makes the tags file even bigger. And fewer editors support it.
I cooked up a small bundle of software that stores ctags references in a sqlite3 database. This allows the data to reside on disk while still allowing fast lookup. Sqlite3 is a small embeddable library that implements a reasonable relational database and doesn't require a server. Because there is a lot of repitition of pathnames and source lines (the referenced lines can be a large portion of the source code), the database is normalized so that each unique pathname and source line is stored only once.
The database relies on extra etags markup provided by exuberant ctags.
The code to load an etags file is in python. For speed, code to search the database is in C as well as python. Sqlite also comes with a command line shell that can do the same searches.All this tool adds is the ability to format the results for your editor. I use a format that makes the results clickable.
Sqlite also supports glob-style patterns, so a query can look for identifiers like '*64_t'.
As a variation on this theme, I also use a tool that produces an full index of all identifiers in the code. This is useful for finding all references to a name. Without compiling, however, it can't distinguish different declarations of the same identifier.
An interesting extension would be to somehow index data from Microsoft *.BSC
code browser files.
queries
Sqlite makes it possible to construct more interesting queries than simple source code lookups.
For example, which header files define stat_...get...()
functions.
select distinct path from refsview
where word like 'stat_%get%' and path like '%.h'
order by path;
and then find all such functions defined in a *.c
file but not also in a *iface.h
or *test.c
file.
select distinct word, path from refsview
where word like 'stat_%get%' and path not like '%.h'
except
select word, path from refsview
where path like '%iface.h' or path like '%_test.c'
order by path;
Code and notes are here.