cscope

how to parse a cscope's database

会有一股神秘感。 提交于 2019-12-05 05:22:22
问题 Is there any way I can parse the cscope's database? I'm using windows, and I can't find any article about the data format of cscope's database, every article is about VIM or EMacs. 回答1: You can find it here. I don't know why this info is not available on the latest manpage. The info you want is under "SYMBOL DATABASE FORMAT". ftp://ftp.eeng.dcu.ie/pub/ee454/cygwin/usr/share/doc/mlcscope-14.1.8/html/cscope.html 来源: https://stackoverflow.com/questions/6494302/how-to-parse-a-cscopes-database

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

蹲街弑〆低调 提交于 2019-12-04 23:43:15
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 variable. Is there a way I can only find the occurrences of S's member variable? I don't think there is any

cscope: How to use cscope to search for a symbol using command line?

人走茶凉 提交于 2019-12-04 11:43:13
问题 All the cscope tutorials I found online talk about how to use the interactive mode of cscope to search for symbols in editors such as vim and emacs. But I think it should be possible to issue a command in terminal to do something like cscope -d -some_options <my symbol> And I should be able to see a list of results in stdout, instead of having to enter the ncurse UI and do everything there. I think this is possible because the "only" frontend cbrowser can do things like that in its TclTK UI.

How to search the tags file and load it automatically when vim start up

纵饮孤独 提交于 2019-12-04 11:22:10
问题 Vim is my favorite editor, when I open a php or python file in vim, the first command is: set tags=../../../tags or set tags=../../tags I think vim can do this automatically: first search ./tags, if it is exists, set it, if not exists search ../tags,if it is exists, set it, if not exists search ../../tags,if it is exists, set it, if not exists until it reaches the / or D: directory However, I am not so familiar with the vim scripts. Any of your help will be appreciated!_ 回答1: There are a few

emacs intellisense

不想你离开。 提交于 2019-12-03 23:01:54
I know this has been discussed a lot of times but is there any nice how-to for c/c++ intellisense in emacs? I have never been able to set up cedet properly. Right now I am working on a maintenance project with a huuge code base and it is very difficult to manage without proper intellisense. Currently I am using vim with ctags/cscope and omnicomplete features for intellisense which works great; but I would like to get things to work with emacs. If you cannot get CEDET working, then you could use auto-complete.el combined with CTAGS or just words-in-buffer or words-in-all-buffers. For what it's

how to parse a cscope's database

◇◆丶佛笑我妖孽 提交于 2019-12-03 20:27:44
Is there any way I can parse the cscope's database? I'm using windows, and I can't find any article about the data format of cscope's database, every article is about VIM or EMacs. You can find it here. I don't know why this info is not available on the latest manpage. The info you want is under "SYMBOL DATABASE FORMAT". ftp://ftp.eeng.dcu.ie/pub/ee454/cygwin/usr/share/doc/mlcscope-14.1.8/html/cscope.html 来源: https://stackoverflow.com/questions/6494302/how-to-parse-a-cscopes-database

cscope: How to use cscope to search for a symbol using command line?

大城市里の小女人 提交于 2019-12-03 07:29:20
All the cscope tutorials I found online talk about how to use the interactive mode of cscope to search for symbols in editors such as vim and emacs. But I think it should be possible to issue a command in terminal to do something like cscope -d -some_options <my symbol> And I should be able to see a list of results in stdout, instead of having to enter the ncurse UI and do everything there. I think this is possible because the "only" frontend cbrowser can do things like that in its TclTK UI. But the code unfortunately is quite beyond me. However, I found no documentation about this capability.

How to search the tags file and load it automatically when vim start up

孤者浪人 提交于 2019-12-03 07:19:50
Vim is my favorite editor, when I open a php or python file in vim, the first command is: set tags=../../../tags or set tags=../../tags I think vim can do this automatically: first search ./tags, if it is exists, set it, if not exists search ../tags,if it is exists, set it, if not exists search ../../tags,if it is exists, set it, if not exists until it reaches the / or D: directory However, I am not so familiar with the vim scripts. Any of your help will be appreciated!_ romainl There are a few comments on this particular subject on this question . Basically, this is supposed to work: set tags

How to let cscope use absolute path in cscope.out file?

China☆狼群 提交于 2019-12-03 06:13:45
问题 Everytime after load a cscope.out in Vim, I need to change Vim's "pwd" to the same directory as cscope.out file is under, which might be due to that cscope use relative path when generating tag file. So if there is a way to force cscope to use absolute path in its tag file - cscope.out, then it will be regardless of whether the pwd of your Vim session is the same as the directory that cscope.out file is under. 回答1: When importing cscope.out, you can supply the prefix, i.e. :cscope add /path

Generate Call-Tree from cscope database

自闭症网瘾萝莉.ら 提交于 2019-12-03 05:55:20
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 generating of it is rather fast. I use vim editor and have X windows system. There is cbrowser program on