6 ms·
Can you elaborate on the difference between finding references (in GLOBAL) and finding callers/callees (in cscope)? The cscope caller/callee search is apparent
by jboy 12y ago
Can you elaborate on the difference between finding references (in GLOBAL) and finding callers/callees (in cscope)?
The cscope caller/callee search is apparently still just text search in the code (rather than unambiguous call-graph resolution by compilation).
- dima55 12y agoBoth cscope and GNU global are "just text search", but cscope's C parsing is fancier. Among other things, you can ask cscope 1. Where is symbol "foo" mentioned? 2. Where is function "foo" called? 3. What other functions does function "foo" call? GNU global can do #1, but not #2 or #3.
- tuhdo 12y agoWell, it seems like GNU Global while can only do #1, but does it better: http://www.farseer.cn/config/2013/11/26/ctags-cscope-gtags/ http://www.farseer.cn/config/2013/11/26/ctags-cscope-gtags/
- dima55 12y agoHeh? That post says its show-me-where-foo-is-defined functionality is broken sometimes, but it doesn't show it (and presumably they never filed a bug upstream either). I compared the two at some point last year, and they did produce slightly different results, with cscope being slightly more correct about something, but I don't recall exactly; they were VERY similar.
- tuhdo 12y agoBut GNU Global is being maintained, while cscope was abandoned. With GNU Global, you can actually update your database without recreating your tag database again. This is very useful for editor integration when you finish editing a file and save it.