That occurrence of _dictInit
in deps/hiredis/dict.c
is the first entry in the database.
Since there are two entries you should get a list like this one:
that allows you to choose which definition to jump to.
Question
I read the code of redis with vim and build the database like this:
find . -iname '*.c' -o -iname '*.cpp' -o -iname '*.h' -o -iname '*.hpp' > cscope.files
cscope -bq -i cscope.files -f cscope.out
and map keys in vim:
nmap <C-@>g :cs find g <C-R>=expand("<cword>")<CR><CR>
When I read src/dict.c
and want to find the definition of function _dictInit
, it should locate to the definition at src/dict.c
, but actually it locate to the definition at deps/hiredis/dict.c
, which has the same name function definition
So how should I fix the problem?
Solution
That occurrence of _dictInit
in deps/hiredis/dict.c
is the first entry in the database.
Since there are two entries you should get a list like this one:
that allows you to choose which definition to jump to.