Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the entry point file in LLVM and Clang?

I have setup a debugger with my Clang & LLVM projects. I want to make sure that it is working. So I want to put a breakpoint at a place where it will surely hit when I execute below command :

clang -S -emit-llvm foo.c

Please help me with the entrypoint function for these projects.

Thanks in advance.

like image 492
Darshan Bhat Avatar asked Dec 17 '25 14:12

Darshan Bhat


1 Answers

Your debugging problems are probably arising from the fact that clang is only a driver, which prepares elaborate command line and invoke the actual compiler.

When debugging Clang, I use the following trick:

  • First append -v to your command line to see actual commands the driver running.
  • Use this output to start the debugging session.
like image 168
arrowd Avatar answered Dec 20 '25 05:12

arrowd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!