ggtags
ggtags copied to clipboard
Support Caller/Callee Search?
I switched to ggtags from xcscope recently. And it is really a faster, easier, more human friendly tool comparing to xcscope. Great job!
But I found caller/callee searching feature was not supported and xcscope did. This feature is frequently used in xcscope by myself. So I wonder if it is possible that this feature be supported in ggtags? I think it will be very useful while navigating C/C++ source code.
In fact, I don't know where to put this request so I create a issue and hope you can see it.
There's a tool that uses GNU Global to query callers/callees: glcall. It would be nice if Leo supports for this tool.
Thanks to both for suggesting and helping.
Those features aren't implemented because of the limit of the backend i.e. global
itself. If you use gtags-cscope
for xcscope
you will find the features missing too. Let me see if upstream is willing to add these features given they just added the pygments
plugin ;)
Cheers, Leo
Requested upstream http://thread.gmane.org/gmane.comp.gnu.global.bugs/1809
@tuhdo or @skyan, Could any of you reply on gnu global's bug mailing list to describe what you would like the feature to look like? Thanks.
@leoliu , Because gtags does not generate cross-reference database like as cscope does, it is impossible to show the "caller information" about a symbol.
However, I have a proposal to workaround temporarily: 0) emacs have cc-mode with syntax parser support, that 'c-defun-name' can find out "caller" of a given position.
- If ggtags searches a symbol or references using cscope format, it's output format is [file search_symbol line others... ].
- the real output of cscope is [file caller line other.... ].
- thus, ggtags can do the replacement in ggtags-global-filter, by using c-defun-name with position composited with 1st and 3rd tokens of gtags's cscope output.
I am also hungry for this feature, and studying to intend to come out a solution. But, I am weak at elisp programming, and expect you expert to easily settle it down. Orz
BR, AST