[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-cflow] Some doubts abotu CFlow
From: |
Sergey Poznyakoff |
Subject: |
Re: [bug-cflow] Some doubts abotu CFlow |
Date: |
Mon, 22 Aug 2016 12:11:59 +0300 |
Leonardo Fernandes Mendonca de Oliveira <address@hidden> ha escrit:
> I have some doubts about CFlow architecture. I don't if the bug list is the
> best place to ask. If not, sorry about that and please tell me who could
> help me.
It's quite OK, you're writing to the right place.
> 1 - What algorithm does CFlow uses to make the call graph?
It parses the sources and builds a DAG of caller->callee dependencies.
> 2 - Does CFlow buid the AST for the code?
Not exactly. It is not, for example, concerned about conditional
expressions and the like. All it's interested in are interfunction
dependencies.
> (my intention is getting information about #ifdef directives).
That's not possible: cflow does not see any preprocessor directives,
much like the regular C compiler doe not see them. They are handled
by cpp before parsing the code.
> 3 - Can I use CFlow as a library in my code?
It is a stand-alone binary (at least now). So far no provisions have
been made for making it a library.
Regards,
Sergey