top | item 25609259

Cscope: A developer's tool for browsing source code

82 points| phab | 5 years ago |cscope.sourceforge.net | reply

35 comments

order
[+] rramadass|5 years ago|reply
An Oldie but a Goldie.

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.

[+] macjohnmcc|5 years ago|reply
A great tool for understanding source code is Source Trail. Supports parsing of C/C++, Python and Java currently. I love tools that help understand a large code base.
[+] pokgak|5 years ago|reply
What would be the workflow when using such tools like this or Source Trail? I've used cscope once while I'm testing out vim as my main text editor a bit.

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.

[+] yeowMeng|5 years ago|reply
Cscope in vim to jump between caller and callee (examine relationship). See where symbols are used. Jump to global definition. Could not live without cscope!
[+] zoomablemind|5 years ago|reply
I used Geany editor (well, it's a "lightweight IDE" GTK based, Scintilla powered) for its ctags integration.

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.

[+] signa11|5 years ago|reply
for purely c based codesbases i don’t think there is anything better that is freely available (would _love_ to hear about equivalent alternatives though. ctags etc don’t seem to have similar functionality afaik)

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...

[+] dejj|5 years ago|reply
What’s the diff of features compared to VSCode’s language server interface?
[+] dhoerl|5 years ago|reply
OMG I used this in the early 80s - first time I’ve seen it mentioned in 30 years!
[+] fctorial|5 years ago|reply
Is it C only? Does it index assembly files (.S) as well?