Am 01.08.2019 um 05:14 schrieb 袁建鹏: > : cs find g platform_device > > But the result contains lots of other things. like: > > variable named platform_device > declaration of struct platform_device
These are perfectly valid results of the search you ran: "find global definition". If you find truly large numbers of the same identifier in such a search, that might be an indication of the source code being in bad shape. > arguments whose type is struct platform device This would not normally count as a valid result for this search. But here you're running into the known (and documented) limitation of the cscope parser in case of function pointers, or generally any function argument lists with more than the one pair of parentheses. The primary effect of that limitation is to blur the distinction between global and local definitions, leading to spurious "global" definitions that are actually local. > Can I let cscope find only the exact definition of struct platform_device. In a nutshell: no. That's not what cscope is meant to do. _______________________________________________ Cscope-devel mailing list Cscope-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cscope-devel