|
Home > Archive > Unix Programming > January 2004 > cscope & gvim (was: Re: (1) cscope & gvim; (2) ctags & C++/STL)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
cscope & gvim (was: Re: (1) cscope & gvim; (2) ctags & C++/STL)
|
|
| Hans-Bernhard Broeker 2004-01-29, 10:34 pm |
| Fred Ma <fma@doe.carleton.ca> wrote:
quote:
> ========================================
===================================
> Question (1): cscope choosese wrong match from list
> ========================================
===================================
Please try to avoid posting two rather unrelated questions in a single
article. I'll answer only to the first, and change the Subj
accordingly.
quote:
> I'm using gvim 6.2 on solaris 8. I've posted question
> (1) to the vim group comp.editors, as well as the vim
> mailing list vim@vim.org. I haven't gotten much
> response yet. I'm using cscope 15.5 with the cscope
> plugin file attached at the very end of this posting.
> I'm pretty new to cscope, but am very pleased with what
> it can do. Especially for C++/STL, where you have
> things defined all over the place.
A note of caution is needed here: cscope is designed for C, not C++.
It manages to catch some C++ syntax, but please don't expect it to be
reliable. It's not.
quote:
> My problem is that when I do a cscope query for symbols
> and get multiple matching results, I get warped to the
> wrong occurance of that symbol. That is, if I choose
> the 7th occurance, I end up at the 5th occurance. The
> offset is usually (but not always) 2 positions up in
> the match list; sometimes, it's 2 positions down,
> depending on the symbol queried.
I rather strongly suspect the problem is with that vim plugin for
cscope, which is maintained by the vim people. But you may want to
check the results generated by cscope itself, too, to see if there's
anything that sticks out. Run cscope on your existing cscope.out
file, like vim does it:
cscope -ld
from the directory cscope.out is in, and type the line '0foo' to
search for all occurances of symbol 'foo'. Include the output of this
in any report you make to the vim guys, or here. It's extremely hard
to debug such problems without a complete, reproducable example or at
least some hard data to inspect.
quote:
> I never tried ":cs reset" because I can't find enough
> documentation what it exactly does (not in the cscope
> man page either).
It can't be in the cscope man page --- the VIM interface is none of
cscope's business.
--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
| |
| Fred Ma 2004-01-29, 11:34 pm |
| Hans-Bernhard Broeker wrote:quote:
>
> Please try to avoid posting two rather unrelated questions in a single
> article.
Sorry. cscope is separate from ctags, despite their similarities
from within gvim.
quote:
> I rather strongly suspect the problem is with that vim plugin for
> cscope, which is maintained by the vim people. But you may want to
> check the results generated by cscope itself, too, to see if there's
> anything that sticks out. Run cscope on your existing cscope.out
> file, like vim does it:
>
> cscope -ld
>
> from the directory cscope.out is in, and type the line '0foo' to
> search for all occurances of symbol 'foo'. Include the output of this
> in any report you make to the vim guys, or here. It's extremely hard
> to debug such problems without a complete, reproducable example or at
> least some hard data to inspect.
Yes, actually I mentioned that cscope worked fine when
used outside of gvim. It will take some time to come up
with a code case, since I don't want to send out large
chunks of my own code at this time (I don't have lots
of different code). As a first step, I was checking
to see if my experience with the gvim plugin was an isolated
one. If so, then it was time to find a suitable chunk of
code that reproduces the problem, though that will be
sleighted somewhat into the future, after a deadline I'm
working toward at the moment.
quote:
> It can't be in the cscope man page --- the VIM interface is none of
> cscope's business.
Got it. I should have emphasized that the problem was
with the gvim plugin.
Fred
--
Fred Ma
Dept. of Electronics, Carleton University
1125 Colonel By Drive, Ottawa, Ontario
Canada, K1S 5B6
|
|
|
|
|