<div dir="ltr"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><div>Hello all,<br></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div class="gmail_quote"><div dir="ltr"><div><br></div><div>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?</div><div><br></div><div>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.</div><div><br></div><div>Consider this very simple c++ program.</div><div><br></div><div>// foo.cpp</div><div>int main(){</div><div> int x, y;</div><div> x = 0;</div><div> y = x + 3;</div><div> return 0;</div><div>}</div><div><br></div><div>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?</div><div><br></div><div>Thanks,</div><div><div><div class="m_-8160345162463266769gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div></div><div><div><span style="font-size:12.8px"><br></span></div><div><span style="font-size:12.8px">Ranadeep</span><br></div><span style="font-size:12.8px">MSc CS 2nd year</span><div>Chennai Mathematical Institute</div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div>
</div><br></div>