Questions tagged [cscope]

Cscope is a code searching application originally written for searching C code bases. Cscope is useful for searching many other code bases as well: C++, Java, Python, etc.

Cscope home page

266 questions
2
votes
1 answer

Trying (and failing) to get cscope/ctags to locate C++ functions in a mixed C / C++ project

I've used both cscope and exuberant-ctags with VIM with great results on pure C projects. However, I've now moved on to a large mixed C / C++ / Java project with a lot of crufty old code and I'm trying to use cscope to gain insight into the code…
arcasinky
  • 43
  • 2
2
votes
1 answer

Better control over where windows with cscope buffers in Emacs

Emacs is my editor of choice, and I use the cscope intergration xcscope.el provides. Recently I had a flirt with Vim. I decided to stay with Emacs, but one of the things I really liked in Vim was how I could control where my cscope windows should…
anr78
  • 1,308
  • 2
  • 17
  • 31
2
votes
1 answer

VIM 7 and cscope: Using "cscope find f" inside a keyboard mapping for switching between files

I usually hop between files on my cscope-indexed codebase by using :cscope find f I'm trying to define a keyboard shortcut to prevent me having to type ":cscope find f" everytime. Pressing this shortcut would bring up an input prompt,…
TCSGrad
  • 11,898
  • 14
  • 49
  • 70
2
votes
1 answer

Vim script to switch between header and implementation file using cscope

I currently use the A.vim plugin to swap between header and implementation file. The limitation of this script is that it only works if both are in the same folder. If you have a cscope database for your code you can easily find the header for a…
Pierre-Antoine LaFayette
  • 24,222
  • 8
  • 54
  • 58
2
votes
1 answer

local environment with multiple projects: How to setup cscope vim?

A localhost development environment (ubuntu maverick gvim apache -> web php css js) The vim plugin "project" appears to be a more robust form of NERDTree - using folds, etc. The vim plugin "sessions" seems geared to reload a project's last working…
Ricalsin
  • 950
  • 9
  • 28
2
votes
1 answer

using ctags or cscope(without interactive mode) from commandline

I am using a custom editor for an embedded systems project. For source code I would like to get ctags working from command line and give me search results on commandline. Other option is to work with cscope in non interactive mode so I can include…
learner
  • 191
  • 1
  • 2
  • 12
2
votes
5 answers

C how to show all unused functions (including ones defined in h files)

Somewhat related to this, but it still doesn't quite answer my question I have a C project, and i would like to enumerate all unreferenced functions (including non-static, so setting compiler option for werror=unused-function only partially…
liekamg
  • 23
  • 5
2
votes
3 answers

ctags error "format error in tags file"

I work on c code base in Linux. I use perforce as source code repository. I had been using ctags and it was working fine. But recently when press ctrl ] in some symbol then I get below error. I removed tags file and recreated the tags file but the…
Ranju
  • 76
  • 13
2
votes
1 answer

How to search in vim cscope result window

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,…
Raymond
  • 744
  • 5
  • 12
2
votes
1 answer

cscope does not save jumps to the tag stack when cscopequickfix is set to use quickfix

Prior to setting cscopequickfix to use vim's quickfix window (via :set cscopequickfix=s-,c-,d-,i-,t-,e-), jumping to cscope tags (e.g. with :cs find s) would cause the jumps to be pushed onto the tagstack (see :h tagstack). When those jumps are in…
2
votes
1 answer

cscope's bug? cscope can't find the definition of a function with a function pointer argument

//main.c #include "stdio.h" void f(){ printf("Welcome to emacs's world!"); return; } void call_f(void (*f)()){ (*f)(); return; } void main(){ call_f(f); return; } I use cscope to find the definition of function "call_f",…
董泽锋
  • 105
  • 9
2
votes
0 answers

cscope doesn't work as expected. Like ctrl + t and so on

I want to be familiar with cscope. So i read a Blog which gives a simple example and followed it step by step. But I failed to complete it successfully. When I typed :cs find g InFile_Open , it jumped into another file which is expected, but…
MMMMMCCLXXVII
  • 571
  • 1
  • 8
  • 23
2
votes
2 answers

How to navigate C source code?

I was writing much java code lately and got quite used to IDE features like jumping to definitions. Now I'm working on C (reading some kernel code) and wonder if there is any similar tooling for that language, too. I am aware of ctags, cscope, and…
michas
  • 25,361
  • 15
  • 76
  • 121
2
votes
2 answers

Find reference of local variable in vim

I am using vim with cscope and ctags. In my earlier editor, I used to find reference of local variables using some key mapped. In vim, using cscope find command, it lists all the variables with same name in other functions too. Is there any way to…
doptimusprime
  • 9,115
  • 6
  • 52
  • 90
2
votes
0 answers

Different cscopequickfix behavior for vimrc and command line

If I do set cscopequickfix=g- in my vimrc file, it does not work: search results do not get listed in quick fix window. But if I do :set cscopequickfix=g- from vim command line, it starts working as expected. What's even more puzzling to me, is that…
Anton Pegushin
  • 450
  • 3
  • 11