This is “yet” another interface to cscope tool (http://cscope.sf.net) for emacs.
It provides the same information as its backend cscope :
- what functions are calling a function
- where is a global symbol
- what is the calling hierarchy of a function
- Download rscope.el
- Evaluate it
- (load “rscope.el”)
Once loaded, each C/C++ file will be offered all the “C-C s” key prefix bindings, providing access to the rscope functions.
You can experiment by :
- Have a cscope database generated somewhere
- Load a C file
- Use a command, for example type “C-c s g”
All keybindings use the “C-c s” prefix:
C-c s s | Find symbol. |
C-c s = | Find assignments to this symbol |
C-c s d | Find global definition. |
C-c s g | Find global definition (alternate binding). |
C-c s c | Find functions calling a function. |
C-c s C | Find called functions (list functions called from a function). |
C-c s t | Find text string. |
C-c s f | Find a file. |
C-c s h | Find calling hierarchy of a function |
- Normal keystrokes :
- Use “n” to navigate to next entry in results
- Use “p” to navigate to previsous entry in results
- Use ENTER bury result buffer and switch to the previewed entry
- Use “q” to bury result buffer and switch to other window.
- Advanced keystrokes:
- Use SPACE to preview an entry
- Use Ctr-ENTER to bury result buffer, and replace it by the selected entry
- Use number <N> to develop current leaf’s subtree up to Nth level
It is born to challenge its cousins :
- xscope
- ascope
- bscope
The main advantages of this interface WRT to its elders are :
- cscope process are spwaned only once for a give cscope.out
- multiple cscope database are allowed
- automatic cscope database is provided
- previews of results
- buffer number limitation (ie. close preview buffers, close buffers with pop-mark when they haven’t been touched)
Once one of the cousins will have achieved the same functionnalities, it will slip in slumber.