[cfe-dev] Building and inspecting CFGs

Jonathan Roelofs via cfe-dev cfe-dev at lists.llvm.org
Tue May 24 14:36:58 PDT 2016



On 5/24/16 3:33 PM, Alexey Sidorin via cfe-dev wrote:
> Hello,
>
> In Clang tools, you can use CFG class (search for CFG.cpp, CFG.h).
> However, I'm not sure if it is available with Python bindings.
>
>
> 23.05.2016 22:28, shr dev via cfe-dev пишет:
>> Hi everyone,
>>
>> I am trying to build a C static analysis tool and in order to make
>> some procedures I need to build Control Flow Graphs. I am using clang

There's already a bunch of infrastructure in place for this... are you 
sure you want to start from scratch? (It uses the CFG infra that Alexey 
mentioned).

http://clang-analyzer.llvm.org/


Jon

>> for parsing the c files and building the AST, in particular I am
>> working with python bindings. I was wondering if there is any way to
>> build and interact with a Control Flow Graph in the same way I can do
>> it throught the AST with pyhton bindings.
>> I inspected the files and I realized that with python bindings this is
>> not possible (maybe I am wrong since I am a little newbie). Maybe
>> exist another way to do it, can you help me with that?
>>
>> Thank you so much, I hope this is the right place for this type of
>> questions.
>>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>

-- 
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded



More information about the cfe-dev mailing list