Friday, October 16, 2020

CTags and CScope

 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

Minicom

 Installation sudo apt install minicom Configuration Giving permission to user for accessing the serial port chmod 666 /dev/ttyUSB0 after th...