Am 07.07.2020 um 22:33 schrieb Timur Tabi:
I have a large project that has a somewhat quirky coding style (lots of
questionable macros) and I'm trying to get cscope to give me a list of
functions that call another function, X.
It's almost certainly those quirks that prevent cscope from actually
parsing that source code correctly.
cscope is obviously able to parse the C code correctly.
No, it didn't parse it correctly, and that's obvious from the L0 output:
kernel/pmgr/nv/pwrchannel_pstate_est_lut.c <global> 57 status =
constructPwrChannel(pGpu, ppBoardObj, size, pArgs);
The clue is here -----------------------------^^^^^^^^
In that position you're supposed to see the name of the function this
reference was found in. I.e. the calling function. There is none,
which means cscope did not believe this line to be inside any function
body; it found it at <global> scope.
Which in turn means that there are almost certainly aspects of the way
this codebase expresses function definitions that make them
unrecognizable to the cscope parser. If there are, e.g., any kind of
macros involved in that, they most likely cannot be recognized.
All that text in the "Notices" section of the manual, on the
recognizable pattern for a function definition, is there for a reason...
_______________________________________________
Cscope-devel mailing list
Cscope-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cscope-devel