Darshan Bhat
Darshan Bhat

Reputation: 311

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.

Upvotes: 3

Views: 999

Answers (1)

arrowd
arrowd

Reputation: 34411

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.

Upvotes: 3

Related Questions