cscope

Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctags

ぃ、小莉子 提交于 2019-12-29 10:07:07
问题 I work on C++ projects, and I went through Alex Ott's guide to CEDET and other threads about tags in StackOverflow, but I am still confused about how Emacs interfaces with these different tag systems to facilitate autocompletion, the looking up of definitions, navigation of source code base or the previewing of doc-strings. What is the difference (e.g. in terms of features) between etags , ebrowse , exuberant ctags, cscope, GNU Global and GTags? What do I need to do to use them in Emacs ? Do

cscope or ctags why choose one over the other? [closed]

南笙酒味 提交于 2019-12-28 03:15:10
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 months ago . I primarily use vim / gvim as an editor and am looking at using a combination of lxr (the Linux Cross Reference) and either cscope or ctags for exploring the kernel source. However, I haven't ever used either cscope or ctags and would like to hear why one might choose one over the other taking into

How to find struct member uses with cscope and ignore local variables?

余生颓废 提交于 2019-12-22 03:42:41
问题 I'm using cscope for a large project with vim, but without the vim mappings (they froze vim for some weird reason). I'm using cscope commands from within vim, and I want to be able to find uses of structure members throughout the code. Suppose I have something like this: 1 typedef struct _s{ 2 3 int x; 4 } S; 5 6 int main(){ 7 8 int x = 1; 9 10 S my_s; 11 12 my_s.x = 5; 13 14 return my_s.x; 15 } If I issue the command 'cs f s x' it will return both S's member variable and the local main

cscope error when trying to use ctags in vim

£可爱£侵袭症+ 提交于 2019-12-21 05:18:51
问题 I have generated ctags for my projects: ctags -f /home/grae/tags --recurse --langmap=C++:.C.h.c.cpp.hpp.inl --languages=C++ --extra=+q --fields=+iaS --c++-kinds=+p --verbose framework/ modules/ /usr/include/ I then added the tags to .vimrc: set tags+=/home/grae/tags I also temporarily added the following (but have now removed): set csto=1 Now when I try Ctrl+] or g] I get the error: cstag: tag not found I shouldn't be using cscope so I'm not sure how this has happened. My current thoughts are

How to use cscope?

不想你离开。 提交于 2019-12-20 19:40:06
问题 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 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

Generate Call-Tree from cscope database

亡梦爱人 提交于 2019-12-20 18:32:03
问题 I want to generate Full and Partially Call Trees from cscope database of c and c++ projects in Linux. The project is rather large, so it can be not easy to work with the full call tree of project, so I want to limit call tree generation with grep-like filter of function names. And also I want to be able to build "called by" and "called from" sub-trees from any point. So tool must be interactive and easy to patch. PS: I want use cscope database, because it is already used in project and

How to use cscope for a project which has .c , .cpp and .h files?

…衆ロ難τιáo~ 提交于 2019-12-20 10:47:02
问题 I am working on a project which requires the understanding of llvm compiler source-code. To browse source code of llvm, I tried to use cscope with following command in the root directory of the source: cscope -R * But it doesn't work. As there are mainly .cpp and .h files but some .c files are also there. So now I don't have a clue how to make cscope work? Can someone please help? 回答1: You can use following commands to do the required task from the root directory of llvm source tree: touch

How to make cscope display full file paths during search

放肆的年华 提交于 2019-12-20 10:46:30
问题 When I search for a C symbol or global definition using cscope , it displays the file-names and line numbers. I would like to see the full file-paths so that I can jump to my arch specific file. For example, when searching for global definition of __switch_to on cscope build on Linux code-base, I get: Global definition: __switch_to File Line 0 process.c 297 struct task_struct *__switch_to(struct task_struct *prev, 1 switch_to.h 44 #define __switch_to(prev,next,last) do { \ 2 process.c 202

how to auto load cscope.out in vim

风格不统一 提交于 2019-12-19 04:45:23
问题 I want to auto load my cscope.out in the subdirectory of my project, so I add this scripts in my .vimrc , which is as follows: set cscopequickfix=s-,c-,d-,i-,t-,e- if has("cscope") set csprg=/usr/bin/cscope set csto=1 set cst set csverb set cspc=3 "add any database in current dir if filereadable("cscope.out") cs add cscope.out "else search cscope.out elsewhere else let cscope_file=findfile("cscope.out", ".;") "echo cscope_file if !empty(cscope_file) && filereadable(cscope_file) exe "cs add"

How to search in vim cscope result window

这一生的挚爱 提交于 2019-12-19 04:20:51
问题 When we use cscope to go to definition of a symbol in vim, lots of candidates may be shown in result window. I'd like to perform searching within the window to find what I need quickly. But search function (/) doesn't seem to work in result window, only a few keys are available, j,k,gg,G, etc. Is there anyway to search in cscope result window? Or can anyone share some experiences with how to work more efficiently in such a situation. Thanks. 回答1: You can use the following: " Filter the