| OLD | NEW |
| 1 {{+bindTo:partials.standard_nacl_article}} | 1 {{+bindTo:partials.standard_nacl_article}} |
| 2 | 2 |
| 3 <section id="debugging"> | 3 <section id="debugging"> |
| 4 <span id="devcycle-debugging"></span><h1 id="debugging"><span id="devcycle-debug
ging"></span>Debugging</h1> | 4 <span id="devcycle-debugging"></span><h1 id="debugging"><span id="devcycle-debug
ging"></span>Debugging</h1> |
| 5 <p>This document describes tools and techniques you can use to debug, monitor, | 5 <p>This document describes tools and techniques you can use to debug, monitor, |
| 6 and measure your application’s performance.</p> | 6 and measure your application’s performance.</p> |
| 7 <div class="contents local" id="table-of-contents" style="display: none"> | 7 <div class="contents local" id="table-of-contents" style="display: none"> |
| 8 <p class="topic-title first">Table Of Contents</p> | 8 <p class="topic-title first">Table Of Contents</p> |
| 9 <ul class="small-gap"> | 9 <ul class="small-gap"> |
| 10 <li><p class="first"><a class="reference internal" href="#diagnostic-information
" id="id2">Diagnostic information</a></p> | 10 <li><p class="first"><a class="reference internal" href="#diagnostic-information
" id="id2">Diagnostic information</a></p> |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 <p>Also, make sure you are passing the <code>-g</code> <a class="reference inter
nal" href="/native-client/devguide/devcycle/building.html#compile-flags"><em>com
pile option</em></a> to <code>pnacl-clang</code> to enable generating debugging
info. | 226 <p>Also, make sure you are passing the <code>-g</code> <a class="reference inter
nal" href="/native-client/devguide/devcycle/building.html#compile-flags"><em>com
pile option</em></a> to <code>pnacl-clang</code> to enable generating debugging
info. |
| 227 You might also want to omit <code>-O2</code> from the compile-time and link-time | 227 You might also want to omit <code>-O2</code> from the compile-time and link-time |
| 228 options, otherwise GDB not might be able to print variables’ values when | 228 options, otherwise GDB not might be able to print variables’ values when |
| 229 debugging (this is more of a problem with the PNaCl/LLVM toolchain than | 229 debugging (this is more of a problem with the PNaCl/LLVM toolchain than |
| 230 with GCC).</p> | 230 with GCC).</p> |
| 231 <p>Once you have built a non-stable debug copy of the pexe, list the URL of | 231 <p>Once you have built a non-stable debug copy of the pexe, list the URL of |
| 232 that copy in your application’s manifest file:</p> | 232 that copy in your application’s manifest file:</p> |
| 233 <pre class="prettyprint"> | 233 <pre class="prettyprint"> |
| 234 { | 234 { |
| 235 "program": { | 235 "program": { |
| 236 "pnacl-translate": { | 236 "portable": { |
| 237 "url": "release_version.pexe", | 237 "pnacl-translate": { |
| 238 "optlevel": 2 | 238 "url": "release_version.pexe", |
| 239 }, | 239 "optlevel": 2 |
| 240 "pnacl-debug": { | 240 }, |
| 241 "url": "debug_version.bc", | 241 "pnacl-debug": { |
| 242 "optlevel": 0 | 242 "url": "debug_version.bc", |
| 243 "optlevel": 0 |
| 244 } |
| 243 } | 245 } |
| 244 } | 246 } |
| 245 } | 247 } |
| 246 </pre> | 248 </pre> |
| 247 <p>Copy the <code>debug_version.bc</code> and <code>nmf</code> files to the loca
tion that | 249 <p>Copy the <code>debug_version.bc</code> and <code>nmf</code> files to the loca
tion that |
| 248 your local web server serves files from.</p> | 250 your local web server serves files from.</p> |
| 249 <p>When you run Chrome with <code>--enable-nacl-debug</code>, Chrome will transl
ate | 251 <p>When you run Chrome with <code>--enable-nacl-debug</code>, Chrome will transl
ate |
| 250 and run the <code>debug_version.bc</code> instead of <code>release_version.pexe<
/code>. | 252 and run the <code>debug_version.bc</code> instead of <code>release_version.pexe<
/code>. |
| 251 Once the debug version is loaded, you are ready to <a class="reference internal"
href="#running-nacl-gdb"><em>run nacl-gdb</em></a></p> | 253 Once the debug version is loaded, you are ready to <a class="reference internal"
href="#running-nacl-gdb"><em>run nacl-gdb</em></a></p> |
| 252 <p>Whether you publish the NMF file containing the debug URL to the release | 254 <p>Whether you publish the NMF file containing the debug URL to the release |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 build a module into a .DLL.</p> | 546 build a module into a .DLL.</p> |
| 545 <section id="open-source-profiling-tools"> | 547 <section id="open-source-profiling-tools"> |
| 546 <h3 id="open-source-profiling-tools">Open source profiling tools</h3> | 548 <h3 id="open-source-profiling-tools">Open source profiling tools</h3> |
| 547 <p>For the brave-hearted there are open source tools at <a class="reference exte
rnal" href="http://www.chromium.org/nativeclient">Chromium.org</a> that describe
how to do profiling on | 549 <p>For the brave-hearted there are open source tools at <a class="reference exte
rnal" href="http://www.chromium.org/nativeclient">Chromium.org</a> that describe
how to do profiling on |
| 548 <a class="reference external" href="https://sites.google.com/a/chromium.org/dev/
nativeclient/how-tos/profiling-nacl-apps-on-64-bit-windows">64-bit Windows</a> | 550 <a class="reference external" href="https://sites.google.com/a/chromium.org/dev/
nativeclient/how-tos/profiling-nacl-apps-on-64-bit-windows">64-bit Windows</a> |
| 549 and <a class="reference external" href="http://www.chromium.org/nativeclient/how
-tos/limited-profiling-with-oprofile-on-x86-64">Linux</a> | 551 and <a class="reference external" href="http://www.chromium.org/nativeclient/how
-tos/limited-profiling-with-oprofile-on-x86-64">Linux</a> |
| 550 machines.</p> | 552 machines.</p> |
| 551 </section></section></section> | 553 </section></section></section> |
| 552 | 554 |
| 553 {{/partials.standard_nacl_article}} | 555 {{/partials.standard_nacl_article}} |
| OLD | NEW |