[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-cflow] Help, please! I want to analyse ALL functions in a set o
Re: [bug-cflow] Help, please! I want to analyse ALL functions in a set of C files.
Fri, 8 Feb 2019 11:22:22 +0000
Thanks for such a rapid and helpful reply.
On Fri, Feb 08, 2019 at 09:33:35 +0200, Sergey Poznyakoff wrote:
> Hi Alan,
> > My problem seems to be that only the functions directly called from
> > main() are getting processed. This omits most Emacs "primitives", C
> > functions which get called by name from the Lisp interpreter rather than
> > from main().
> Yes, normally cflow descends the parse tree beginning from the "start
> symbol", which is "main" by default. There are two important points:
> first, the start symbol can be redefined using the --main (-m) option,
> and secondly, if the start symbol does not appear in any of the source
> files given to cflow, it will output flow graphs for all functions.
> The latter seems to be exactly what you need. So, I'd suggest giving the
> name of a non-existing function as the start symbol, e.g.:
> $ cflow -b --cpp `cat ~/emacs-cflow-ls.txt` -m someneverdefinedsymbol *.c
> Please, let me know if that works for you.
That does indeed work splendidly. :-) Many thanks!
> In the meantime, I'll implement an option that would instruct cflow to
> output all functions without using this kludge.
I'll keep an eye open for this in the next cflow release.
Alan Mackenzie (Nuremberg, Germany).