cscope: Cscope error: cscope: cannot read list size from file cscope.out

不羁的心 提交于 2020-01-15 05:36:04

问题


Issue: I get the following error when I try to open a file in vim (version 7.3).

cs_read_prompt EOF: Illegal seek E609: Cscope error: cscope: cannot read list size from file cscope.out

Description: I created the cscope database "cscope.out" using the command "cscope -b -R". The file ~/.vim/plugin/cscope_maps.vim contains the command "cs add cscope.out" to add the cscope database. When I try to open one of the source files, I get the error mentioned above.

uname -a

Linux 2.6.16.60-0.58.1.3835.0.PTF.638363-smp #1 SMP Wed Dec 2 12:27:56 UTC 2009 x86_64 x86_64 x86_64 GNU/Linux

What could be the problem here?

Thanks for your help.


回答1:


I had the same problem.

Mine got resolved when I found that the size of the "cscope.out" file was too LARGE(~2.5GB).
Create a separate cscope DB for larger sub folders. And add all DBs separately using ":cs add ".

Note: Reverse index(cscope -b -q) creates larger files.




回答2:


One of the cases where you encounter this error is: if you have a directory that has space(s) in the directory name (even in the path of your source folder) then rename the directory without space(s) and retry.




回答3:


There may be multiple version of cscope on your system. You may check various location of your cscope binary by

whereis cscope

Then add one of this path in your .vimrc

vim ~/.vimrc
set csprg=/path/to/your/desired/cscope


来源:https://stackoverflow.com/questions/11132481/cscope-cscope-error-cscope-cannot-read-list-size-from-file-cscope-out

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!