SeungukShin / cscope-code

Cscope Extension for Code
11 stars 4 forks source link

Does not list all occurences #10

Open guntern opened 2 years ago

guntern commented 2 years ago

I switched to cscope-code from scope4code, because I found the "interface" of scope4code via the text file annoying. The list provided by cscope-code looks much nicer and is easier to use.

However, the list provided by cscope-code is not complete! When running CScope code: Caller on a function it does not return all function calls. cscope-code lists just 6 function calls and it is very clear that some are missing, because the particular function is called in close vicinity so I actually see that some calls are not listed. scope4code correctly lists all 9 calls of the function.

So currently cscope-code is not usable because I cannot trust the result. I know it is merely a 0.0.6 ;-)

SeungukShin commented 2 years ago

Dear @guntern, Thank you for the try this extension. I tested this with couple of functions in Linux kernel, but I could not find any difference between command line output and this extension's output. Could you let me know what function did you try in which project? or could you try to use cscope command line and check there is difference? This extension use cscope -RdL -3 <function name> to find caller.

guntern commented 2 years ago

Hi @SeungukShin , unfortunately I cannot share the source code, because it is internal. I was not yet able to find some source code I could share, which reproduces the behavior. However, I tested the command. To my surprise it also misses the functions. I was pretty sure, that I checked with the cscope interface via cscope -R and got all function calls listed. But now the list is the same as in your extension. Just scope4code still shows all calls. I am really puzzled. But apparantly I have to start digging at the cscope end.