Hi,<div>I am a student and new to Clang. I want to know the development tools that you use.</div><div>what I exactly wanted to know is, how do you debug the code.</div><div><font face="arial, helvetica, sans-serif"><br></font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-image:initial;background-color:rgb(255,255,255);clear:both;word-wrap:break-word;line-height:18px;text-align:left">
<font face="arial, helvetica, sans-serif">I am trying to debug Clang using Eclipse. I have put a break point in clang/lib/lex/preprocessor.cpp at the preprocessor's constructor.</font></p><ol style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:30px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-image:initial;background-color:rgb(255,255,255);list-style-position:initial;line-height:18px;text-align:left">
<li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-image:initial;background-color:transparent;word-wrap:break-word">
<font face="arial, helvetica, sans-serif">I have set a "test.c" file as an argument in the debug configurations.</font></li><li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-image:initial;background-color:transparent;word-wrap:break-word">
<font face="arial, helvetica, sans-serif">Went to Run-> Debug As-> Local C/C++ Application.</font></li><li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-image:initial;background-color:transparent;word-wrap:break-word">
<font face="arial, helvetica, sans-serif">It asked "Choose local application to debug". I chose "clang" and clicked OK.</font></li><li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-image:initial;background-color:transparent;word-wrap:break-word">
<font face="arial, helvetica, sans-serif">It started building the code. build completed.</font></li><li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-image:initial;background-color:transparent;word-wrap:break-word">
<font face="arial, helvetica, sans-serif">Stopped at main() in the debug window. (No source available for main())</font></li><li style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-image:initial;background-color:transparent;word-wrap:break-word">
<font face="arial, helvetica, sans-serif">After some step overs, it says "terminated: gdb Debugger (Exited. Exit code=255)"</font></li></ol><p style="margin-top:0px;margin-right:0px;margin-bottom:1em;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;vertical-align:baseline;background-image:initial;background-color:rgb(255,255,255);clear:both;word-wrap:break-word;line-height:18px;text-align:left">
<font face="arial, helvetica, sans-serif">I am not taken to the clang code (preprocessor code). can someone please tell me how to debug the clang code.? I want to see the code flow in clang. and how clang is constructing the AST.</font></p>
<div><br></div>Best Regards,<div>Srikanth Vaindam</div><br><br>
</div>