<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 4/14/14 6:53 AM, 蜡笔小新 wrote:<br>
</div>
<blockquote cite="mid:tencent_22189ECE1A1888732B2937E0@qq.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div>Hi, everyone.</div>
<div><br>
</div>
<div>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. <br>
</div>
</blockquote>
<br>
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:<br>
<br>
make ENABLE_OPTIMIZED=0<br>
<br>
All of the object files and tools will be placed in a Debug or
Debug+Asserts directory.<br>
<br>
More documentation on this can be found in the LLVM Getting Started
Guide:<br>
<br>
<a class="moz-txt-link-freetext" href="http://llvm.org/docs/GettingStarted.html#compiling-the-llvm-suite-source-code">http://llvm.org/docs/GettingStarted.html#compiling-the-llvm-suite-source-code</a><br>
<br>
Regards,<br>
<br>
John Criswell<br>
<br>
</body>
</html>