My favorites | Sign in
Google
                
Search
for
Updated Mar 02, 2007 by philbert
Labels: Featured
GTags  
General usage.

Google Tags (GTags)

Google Tags is a project to speed up code browsing in large source code base. Here are some scenarios where it can help:

  • While you're browsing source code, Gtags can immediately jump to the definition of a function or variable.
  • Gtags can grep over all definitions or function calls in your source code.
  • Gtags can tell you where all the callers of a particular function are.

We do this by extending the TAGS functionality in GNU Emacs and XEmacs. A separate server-side component answers requests for particular tags and returns a set of matching results for each.

We provide an Emacs client, a command-line client, and a VI client. We also provide a Python API.

More information about...

Quick guide for Emacs

For more detail (or for non-Emacs users), follow one of the Clients links above.

First, load gtags.el.

  • M-x google-show-tag-locations [RET] TAGNAME [RET] searches for all tags definitions matching TAGNAME.
  • M-x google-show-tag-locations-regexp [RET] PREFIX [RET] searches for all tag definitions beginning with PREFIX (which may be a regular expression).
  • M-x google-show-callers [RET] TAGNAME [RET] searches for all tag calls matching TAGNAME.

How It Works

The gentags script (gentags.py) generate 6 tags files:{cpp,java,python}{,.callers}.tags.gz. We generate the files by running etags followed by etags_to_tags.py.

The code for the server lives in gtags.cc. To build it, run ./configure; make. To run the GTags server:

$ gtags --tags_file ./cpp.tags --tags_port 2222

To save space and time, we support reading from gzipped tags files:

$ gtags --tags_file ./cpp.tags.gz --tags_port 2222 --gunzip

Different servers handle requests for different TAGS files; different port numbers correspond to different languages. Clients (like EMACS' google-show-tag-locations) must determine the appropriate server/port to send requests to.

To prevent denial of service attacks, all commands return at most 1000 results, so that if you have too many results the server won't be kept busy showing just results that are of interest to you.

List of Files

gtags.cc: and friends: server (this is required)
etags.el: GNU Emacs etags implementation (comes with GNU Emacs, required for Xemacs)
gtags.py: python library to talk to the server
gtags.sh: shell implementation to talk to server
gtags.vim: vim client
gtags_vim.py: support for vim client
rtags.py: callgraph indexing for java, python, c/c++
gentags.py: create indexes for java, python, c/c++

GTags is brought to you by...

Ken Ashcraft, Stephen Chen, Arthur Gleckler, Laurence Gonsalves, Leandro Groisman, Sitaram Iyer, Piaw Na, Arun Sharma, Phil Sung


Comment by ukruda, Jun 10, 2008

fast domain newesst

Comment by elahimanuela, Dec 07, 2008

cars

Comment by volstream, Apr 26, 2009

www.volstream.co.cc

Comment by mobiles2mobiles, Aug 19, 2007

mobile phone

Comment by mobiles2mobiles, Aug 19, 2007
Comment by desportosdeginasio, Apr 02, 2008

desporto, proteinas


Sign in to add a comment