Add a declaration of environ global for Darwin
[oota-llvm.git] / docs / HowToSubmitABug.html
index 69da4fafdbf2052f49f3c3c42859c70ffe451c73..6449f29dcd99c5b7b1fcae6c8ae76f8f02186b02 100644 (file)
 
 </ol>
 
-<div class="doc_text">
-  <p><b>Written by <a href="mailto:sabre@nondot.org">Chris Lattner</a> and
-                   <a href="http://misha.brukman.net">Misha Brukman</a></b></p>
+<div class="doc_author">
+  <p>Written by <a href="mailto:sabre@nondot.org">Chris Lattner</a> and
+                <a href="http://misha.brukman.net">Misha Brukman</a></p>
 </div>
 
 </td>
 <td align="right">
-  <img src="Debugging.gif" alt="Debugging" width="444" height="314">
+  <img src="img/Debugging.gif" alt="Debugging" width="444" height="314">
 </td>
 </tr>
 </table>
@@ -148,8 +148,7 @@ compilation, compile your test-case to a <tt>.s</tt> file with the
 <tt>-save-temps</tt> option to <tt><b>llvm-gcc</b></tt>. Then run:</p>
 
 <div class="doc_code">
-<p><tt><b>gccas</b> -debug-pass=Arguments &lt; /dev/null -o - &gt; /dev/null
-</tt></p>
+<p><tt><b>gccas</b> -debug-pass=Arguments &lt; /dev/null -o - &gt; /dev/null</tt></p>
 </div>
 
 <p>... which will print a list of arguments, indicating the list of passes that
@@ -172,8 +171,9 @@ being linked together (the "<tt><b>llvm-gcc</b> -v</tt>" output should include
 the full list of objects linked).  Then run:</p>
 
 <div class="doc_code">
-<p><tt><b>llvm-as</b> &lt; /dev/null &gt; null.bc
-       <b>gccld</b> -debug-pass=Arguments null.bc</tt></p>
+<p><tt><b>llvm-as</b> &lt; /dev/null &gt; null.bc<br>
+<b>gccld</b> -debug-pass=Arguments null.bc</tt>
+</p>
 </div>
 
 <p>... which will print a list of arguments, indicating the list of passes that
@@ -203,12 +203,12 @@ something tractable, use the <tt><b>bugpoint</b></tt> tool as follows:</p>
 test-case, but it should eventually print something like this:</p>
 
 <div class="doc_code">
-<pre>
-...
-Emitted bytecode to 'bugpoint-reduced-simplified.bc'
-
-*** You can reproduce the problem with: opt bugpoint-reduced-simplified.bc -licm
-</pre>
+<p><tt>
+...<br>
+Emitted bytecode to 'bugpoint-reduced-simplified.bc'<br>
+<br>
+*** You can reproduce the problem with: opt bugpoint-reduced-simplified.bc -licm<br>
+</tt></p>
 </div>
 
 <p>Once you complete this, please send the LLVM bytecode file and the command
@@ -242,8 +242,8 @@ which code generator you wish to compile the program with (e.g. C backend, the
 JIT, or LLC) and optionally a series of LLVM passes to run.  For example:</p>
 
 <div class="doc_code">
-<p><tt><b>bugpoint</b> -run-cbe [... optimization passes ...] file-to-test.bc
---args -- [program arguments]</tt></p>
+<p><tt>
+<b>bugpoint</b> -run-cbe [... optzn passes ...] file-to-test.bc --args -- [program arguments]</tt></p>
 </div>
 
 <p><tt>bugpoint</tt> will try to narrow down your list of passes to the one pass
@@ -272,15 +272,21 @@ Backend, and then link in the shared object it generates.</p>
 <p>To debug the JIT:</p>
 
 <div class="doc_code">
-<p><tt><b>bugpoint</b> -run-jit -output=[correct output file] [bytecode file]
---args -- [program arguments]</tt></p>
+<pre>
+bugpoint -run-jit -output=[correct output file] [bytecode file]  \
+         --tool-args -- [arguments to pass to lli]               \
+         --args -- [program arguments]
+</pre>
 </div>
 
 <p>Similarly, to debug the LLC, one would run:</p>
 
 <div class="doc_code">
-<p><tt><b>bugpoint</b> -run-llc -output=[correct output file] [bytecode file]
---args -- [program arguments]</tt></p>
+<pre>
+bugpoint -run-llc -output=[correct output file] [bytecode file]  \
+         --tool-args -- [arguments to pass to llc]               \
+         --args -- [program arguments]
+</pre>
 </div>
 
 <p><b>Special note:</b> if you are debugging MultiSource or SPEC tests that
@@ -289,8 +295,10 @@ debug the JIT, LLC, and CBE, using the pre-written Makefile targets, which
 will pass the program options specified in the Makefiles:</p>
 
 <div class="doc_code">
-<p><tt>cd llvm/test/../../program<br>
-       make bugpoint-jit</tt></p>
+<p><tt>
+cd llvm/test/../../program<br>
+make bugpoint-jit
+</tt></p>
 </div>
 
 <p>At the end of a successful <tt>bugpoint</tt> run, you will be presented
@@ -303,28 +311,32 @@ the following:</p>
 
 <ol>
 
-  <li><p>Regenerate the shared object from the safe bytecode file:</p>
+<li><p>Regenerate the shared object from the safe bytecode file:</p>
 
-  <div class="doc_code">
-  <p><tt><b>llc</b> -march=c safe.bc -o safe.c<br>
-         <b>gcc</b> -shared safe.c -o safe.so</tt></p>
-  </div></li>
+<div class="doc_code">
+<p><tt>
+<b>llc</b> -march=c safe.bc -o safe.c<br>
+<b>gcc</b> -shared safe.c -o safe.so
+</tt></p>
+</div></li>
 
-  <li><p>If debugging LLC, compile test bytecode native and link with the shared
-      object:</p>
+<li><p>If debugging LLC, compile test bytecode native and link with the shared
+    object:</p>
 
-  <div class="doc_code">
-  <p><tt><b>llc</b> test.bc -o test.s -f<br>
-         <b>gcc</b> test.s safe.so -o test.llc<br>
-         ./test.llc [program options]</tt></p>
-  </div></li>
-      
-  <li><p>If debugging the JIT, load the shared object and supply the test
-      bytecode:</p>
+<div class="doc_code">
+<p><tt>
+<b>llc</b> test.bc -o test.s -f<br>
+<b>gcc</b> test.s safe.so -o test.llc<br>
+./test.llc [program options]
+</tt></p>
+</div></li>
+    
+<li><p>If debugging the JIT, load the shared object and supply the test
+    bytecode:</p>
 
-  <div class="doc_code">
-  <p><tt><b>lli</b> -load=safe.so test.bc [program options]</tt></p>
-  </div></li>  
+<div class="doc_code">
+<p><tt><b>lli</b> -load=safe.so test.bc [program options]</tt></p>
+</div></li>  
 
 </ol>