I am a student and new to Clang. I want to know the development tools that you use.
what I exactly wanted to know is, how do you debug the code.
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.
- I have set a “test.c” file as an argument in the debug configurations.
- Went to Run-> Debug As-> Local C/C++ Application.
- It asked “Choose local application to debug”. I chose “clang” and clicked OK.
- It started building the code. build completed.
- Stopped at main() in the debug window. (No source available for main())
- After some step overs, it says “terminated: gdb Debugger (Exited. Exit code=255)”
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.
Best Regards,Srikanth Vaindam