如何使用cscope? [英] How to use cscope?
问题描述
我正在使用cscope熟悉套接字编程中使用的所有关键字.我去了C文件的目录.我用了cscope.然后我搜索了AF_INET.我知道了:
I am using cscope to get familiar with all the keywords used in socket programming. I went to the directory with c files. I used cscope. and then I searched for AF_INET. I got this :
#define AF_FILE PF_FILE
#define AF_INET PF_INET
#define AF_AX25 PF_AX25
这是整页.我只发表了一部分.现在我想知道这个PF_INET来自何处?我应该使用什么命令.我看到一个人双击PF_INEt并使用一些命令来找到它.我不知道命令是什么?请帮助我.
This was a full page. I only published part of it. Now I want to know from where this PF_INET is coming? what command I should use. I have seen a guy to double click on PF_INEt and using some command to find it. I don't know what the command is? Kindly help me in this.
第二件事是当我使用:q命令退出页面时.我来到此页面:
The second thing is when i quit the page with :q command. I come to this page :
Global definition: AF_INET
File Line
0 socket.h 119 #define AF_INET PF_INET
Find this C symbol:
Find this global definition:
Find functions called by this function:
Find functions calling this function:
Find this text string:
Change this text string:
Find this egrep pattern:
Find this file:
Find files #including this file:
此处光标从0闪烁.如果我想再次搜索某物,该怎么办? 如何从这里导航.我试图用Google搜索它,但无法从管弦乐中了解任何内容.在这方面请帮助我,因为我对Linux操作系统和C编程完全陌生.预先感谢.
here the cursor is blinking at 0. If I want to search again something, how I will do? How to navigate from here. I tried to google it but unable to understand anything from the tutoials. Please help me in this regard as I am complete noob to linux operating system and c programming. Thanks in advance.
推荐答案
我同意cscope文档不是很清楚.
I agree that cscope documentation is not very clear.
使用标签移动到交互式部件.在查找此C符号"或查找此egrep模式"中键入您的符号名称,然后按RETURN进行确认.
Use tab to move to the interactive part. Type your symbol name in "find this C symbol" or "Find this egrep pattern" and validate pressing RETURN.
如果要从vim调用它,请键入:help if_cscop.txt
;希望能有所帮助!
If you want to call it from vim, type :help if_cscop.txt
; hoping it helps!
:cscope add your_cscope_database
:cscope find s [your_symbol]
这将创建一个新的快速修复列表.使用:cn
和:cp
进行导航,使用:cnf
和:cpf
在结果中的文件之间导航,并使用:colder
和:cnewer
还原以前的快速修复列表.
This will make a new quickfix list. use :cn
and :cp
to navigate, :cnf
and :cpf
to navigate from file to file in the results, and :colder
and :cnewer
to restore previous quickfix lists.
这篇关于如何使用cscope?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!