Cscope: A developer's tool for browsing source code
cscope.sourceforge.net
cscope.sourceforge.net
Related "CodeQuery"(https://github.com/ruben2020/codequery) which uses both cscope and ctags databases (i use both for C/C++ code from within vim) and provides a GUI frontend.
Combine with "Doxygen" and "GNU cflow" (https://www.gnu.org/software/cflow/) and you get a very good view of the static structure of any codebase.
To get a Runtime view i prefer the call graph emitted by the profiler gprof.
I built https://twitter.com/PredragGruevski/status/13447256045208780... just for fun as an exploration of this space, and I'm wondering where the limits are :)
The hardest part for me has been setting up the list of files and folders to scan for the project and trying to eliminate errors. Fortunately you still get useful data depending on the errors.
Nowadays I'm using the global search feature of vscode for code exploration. Combined with the available language server for each language, it seems to work well enough for me currently.
https://sourceforge.net/projects/cscope/files/
I set the forward proxy automatically rewrite http://subdomain.sourceforge.net links into the above https:// format.
Also helpful for exploration of unknown code. However, in general it navigates between files opened already (as it generates ctags on open). But allows loading an externally generated ctags file. Also does symbol usage lookup and auto-completion.
cacope has excellent emacs integration as well.
for c++, unfortunately, cscope was ok till about c++-98, but modern incarnation of the standard seem to have given rise to a slew of tools for code navigation.
most notable amongst them being around the notion of compilation databases and language servers etc. unfortunately though, for large codebases (>= 1 giga-lines) in my experience they don’t seem to offer anything better, and need to be used in conjunction with grep and their modern incarnations f.e ripgrep etc. making the entire workflow quite unwieldy...
Currently an unmaintained project. https://sourceforge.net/projects/kscope/
I switched a few years ago, maybe i wasn't using all of cscope's strengths?
The reason i like it is because it is implemented in the classic "Unix Tools" manner i.e. small, fast, self-contained, good feature set and easily integrated with many editors. Now of course you have lots more tools with similar functionalities but i find most to be too big and unwieldy with lots of dependencies and a pain to setup. If you have ever been forced to work on minimal systems with no Desktop GUIs, remote targets etc. you come to appreciate small powerful tools which you can carry with you everywhere.
Not in my experience. YCM does browsing in Vim better than cscope's the way i used both. It was an easy switch to make and not look back for me. YCM features seemed to me like a superset of cscope Vim integration. Maybe i was missing something? Jumping to and back to function callers, definitions, variables etc. Clang just seemed to work better. Possibly because it understands C parsing which cscope kinda does some heuristics and hopes for the best? Dunno.
But yeah because it parses properly you get tab completion that works too. That isn't a negative for mine. Don't have to use it, super convenient and fast sometimes when you do.
I run Vim in a terminal. Works most places with my vimrc etc that i would edit source code. Includes a mips router, arm phone etc.
I used cscope for years. Before that ctags. I consider them obsolete for my uses, but i may have been missing something. Still don't know what.
For example, for my work environment i have standardized on GNU Screen + dvtm + vim (few plugins) + cscope + ctags; thats it. Depending upon available hardware and need, i may add more tools but the above is what i try to carry everywhere.
As they say, "if it ain't broke, don't fix it".