开发者

strange cscope command line limitation

开发者 https://www.devze.com 2023-01-21 22:00 出处:网络
Cscope has eleven search input fields 开发者_开发百科in interactive mode. But when I try to use it in line-oriented output mode and specify Find all symbol assignments: field using -10 switch it does

Cscope has eleven search input fields 开发者_开发百科in interactive mode. But when I try to use it in line-oriented output mode and specify Find all symbol assignments: field using -10 switch it does not work. Any ideas?

Thanks.


I also see some little strange-ness.

In terminal,

cscope -d

gives the following options

Find this C symbol:
Find this global definition:
Find functions called by this function:
Find functions calling this function:
Find this text string:
Change this text string:
Find this egrep pattern:
Find this file:
Find files #including this file:

But, using my cscope plugin in gvim,

:cs help 

gives the following options

find : Query for a pattern            (Usage: find c|d|e|f|g|i|s|t name)
   c: Find functions calling this function
   d: Find functions called by this function
   e: Find this egrep pattern
   f: Find this file
   g: Find this definition
   i: Find files #including this file
   s: Find this C symbol
   t: Find assignments to

The "Find assignments to" option is available only in the second.

So, for line-oriented output mode, the closest seems to be the "Find this text string:" option. That can be done as

cscope -d -L -4 <text>


The assignment option was added by RedHat patch, it is not part of the original cscope. Seems like they patched only ncurses interface without updating the corresponding command line options.

0

精彩评论

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

关注公众号