ecsimsw

using ctags / cscope 본문

using ctags / cscope

JinHwan Kim 2019. 4. 3. 06:38

ctags / cscope

- ctags와 cscope를 이용하여 코드를 분석하는 방법과 유용했던 팁을 정리하였다.
  • ctags
    - tj 명령어 뒤에 원하는 태그 이름을 입력하는 것으로 해당 함수나 변수가 선언된 위치로 점프할 수 있다.
    :tj "tags"
    - 명령어를 이용하지 않고 원하는 함수나 변수 위에 커서를 두고 점프하고 이전으로 돌아갈 수 있다.
    ctrl + ] ctrl + t
  • cscope
    - cs type option keyword로 실행한다. type은 add / find / help / kill / reset / show 가 있고, find(f)와 아래 옵션을 통해 키워드를 검색한다.
    cscope commands[f] g : find the definitions s : search this c symbol c : find functions calling this d : find functions called by this f : find this file l : find tiles including this file e : find this egrep pattern
  • Error
    - sorry the command is not available in this version
    sudo apt-get install vim-gui-common sudo apt-get install vim-runtime
    - no cscope connections
    :cscope add cscope.out

'Computer Science > Linux, Git' 카테고리의 다른 글

Slack으로 Github 알림 받기  (8) 2021.07.04
install ctags / cscope  (0) 2019.04.02
Shell / Shell script / Terminal, Console  (0) 2019.03.12
Pipe / Redirection  (0) 2019.03.12
ens33 setting  (0) 2019.03.11
Comments