On 4/14/14 6:53 AM, 蜡笔小新 wrote:> Hi, everyone.
>
> I scanned the documents listed in the website of LLVM, however, I
> can't find information about how to debug the LLVM and Clang. As is
> known to all, the "-g" option of GCC can help us to debug a
program
> step by step. In the configure file of LLVM, I can see the "-g
-O2"
> option, but I have no idea about what should I do to set up the debug
> mode. So I changed all the options to "-g -O2" in order to trace
the
> LLVM step by step. However, my effort didn't work.
To compile Clang and LLVM with debugging symbols, you need to add the
ENABLE_OPTIMIZED=0 option to the make command line; this will create
what is called a Debug build:
make ENABLE_OPTIMIZED=0
All of the object files and tools will be placed in a Debug or
Debug+Asserts directory.
More documentation on this can be found in the LLVM Getting Started Guide:
http://llvm.org/docs/GettingStarted.html#compiling-the-llvm-suite-source-code
Regards,
John Criswell
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20140414/5f18faa4/attachment.html>