These are two commands used for the traversing the source codes.
ctag
Installation
sudo apt install exuberant-ctags
Go to the code base and run the following command. it will generate tags folder which contains the database
ctags -R or ctags *
R means recursive in all folder
ctrl + ] → jump to the function call
ctrl + T → take it back.
- We can use vi editor for testing this.
- :ta <tags>
- it search for the tags
cscope
Installation
sudo apt install cscope
Getting the database
cscope -R
there is two sections
matching list
menu list
use tab key to move between matching and menu list.
ctrl + d to exit the cscope.
No comments:
Post a Comment