[CastXML] Fwd: using castxml to generate control flow graph
Ranadeep Biswas
ranadeep at cmi.ac.in
Sat Oct 1 07:50:11 EDT 2016
Hello all,
I am doing this project that needs to parse a c/c++ program and generate
its control flow graph so that I can do some analysis on it. Can this be
done using castxml?
I tried to use castxml to generate xml output to build the CFG, but I can
not generate the output as per my need. I could not find any good
documentations. May be I am missing something.
Consider this very simple c++ program.
// foo.cpp
int main(){
int x, y;
x = 0;
y = x + 3;
return 0;
}
now I run `castxml --castxml-cc-gnu g++ --castxml-gccxml foo.cpp`. It
generates `foo.xml` file, but xml file contains a lot of other tags. But I
don't find tags for variable x and y. Also is it possible to trim the
output, so that I can get tags for only main, x, y and relevant types?
Thanks,
Ranadeep
MSc CS 2nd year
Chennai Mathematical Institute
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/castxml/attachments/20161001/2172dc30/attachment.html>
More information about the CastXML
mailing list