开发者

cscope+vim: context dependent order in the list of definitions

开发者 https://www.devze.com 2023-03-18 18:46 出处:网络
I\'m learning scheduling code in FreeBSD kernel and navigating through the source code using Vim\'s cscope plugin.

I'm learning scheduling code in FreeBSD kernel and navigating through the source code using Vim's cscope plugin.

In general it works fine, but there is one really inconvenient thing - in case there are more than one family of functions in the source code with the same names, cscope shows all of them:

  # pri kind tag               file
  1 F   f    sched_nice        sys/kern/sched_4bsd.c
               sched_nice(struct proc *p, int nice)
  2 F   f    sched_nice        sys/kern/sche开发者_开发知识库d_ule.c
               sched_nice(struct proc *p, int nice)
Type number and  (empty cancels): 

In FreeBSD there are two schedulers - 4BSD and ULE which implement the same interface. I'm only interested in ULE and want to either filter out unneeded 4bsd files or at least force cscope to show ULE files before 4bsd.

Is it possible at all?

Thanks!

P.S. I know that I can ignore unneeded files at generation of cscope.out, but sometimes I need to examine 4bsd files. So it's preferable to work with full cscope database.


I don't think it is possible if you do not modify the cscope source code.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号