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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 <p>When you run Chrome with <code>--enable-nacl-debug</code>, Chrome will transl
ate | 188 <p>When you run Chrome with <code>--enable-nacl-debug</code>, Chrome will transl
ate |
189 and run the <code>debug_version.bc</code> instead of <code>release_version.pexe<
/code>. | 189 and run the <code>debug_version.bc</code> instead of <code>release_version.pexe<
/code>. |
190 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> | 190 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> |
191 <p>Whether you publish the NMF file containing the debug URL to the | 191 <p>Whether you publish the NMF file containing the debug URL to the |
192 release web server, is up to you. One reason to avoid publishing the | 192 release web server, is up to you. One reason to avoid publishing the |
193 debug URL is that it is only guaranteed to work for the Chrome version | 193 debug URL is that it is only guaranteed to work for the Chrome version |
194 that matches the SDK version. Developers who may have left the | 194 that matches the SDK version. Developers who may have left the |
195 <code>--enable-nacl-debug</code> flag turned on may end up loading the debug | 195 <code>--enable-nacl-debug</code> flag turned on may end up loading the debug |
196 copy of your application (which may or may not work, depending on | 196 copy of your application (which may or may not work, depending on |
197 their version of Chrome).</p> | 197 their version of Chrome).</p> |
198 <h4 id="debugging-pnacl-pexes-with-older-pepper-toolchains">Debugging PNaCl pexe
s (with older Pepper toolchains)</h4> | 198 <h4 id="debugging-pnacl-pexes-with-older-pepper-toolchains"><span id="debugging-
pexes-via-nexes"></span>Debugging PNaCl pexes (with older Pepper toolchains)</h4
> |
199 <p>If you want to use GDB to debug a program that is compiled with the PNaCl | 199 <p>If you want to use GDB to debug a program that is compiled with the PNaCl |
200 toolchain, you must convert the <code>pexe</code> file to a <code>nexe</code>.
(You can skip | 200 toolchain, you must convert the <code>pexe</code> file to a <code>nexe</code>.
(You can skip |
201 this step if you are using the GCC toolchain, or if you are using | 201 this step if you are using the GCC toolchain, or if you are using |
202 pepper 35 or later.)</p> | 202 pepper 35 or later.)</p> |
203 <ul class="small-gap"> | 203 <ul class="small-gap"> |
204 <li>Firstly, make sure you are passing the <code>-g</code> <a class="reference i
nternal" href="/native-client/devguide/devcycle/building.html#compile-flags"><em
>compile option</em></a> to <code>pnacl-clang</code> to enable generating debugg
ing info. | 204 <li>Firstly, make sure you are passing the <code>-g</code> <a class="reference i
nternal" href="/native-client/devguide/devcycle/building.html#compile-flags"><em
>compile option</em></a> to <code>pnacl-clang</code> to enable generating debugg
ing info. |
205 You might also want to omit <code>-O2</code> from the compile-time and link-time | 205 You might also want to omit <code>-O2</code> from the compile-time and link-time |
206 options.</li> | 206 options.</li> |
207 <li><p class="first">Secondly, use <code>pnacl-translate</code> to convert your
<code>pexe</code> to one or more</p> | 207 <li><p class="first">Secondly, use <code>pnacl-translate</code> to convert your
<code>pexe</code> to one or more</p> |
208 <p><code>nexe</code> files. For example:</p> | 208 <p><code>nexe</code> files. For example:</p> |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 development tools on your system, but when you’re finished developing the | 475 development tools on your system, but when you’re finished developing the |
476 plugin, you need to port it to Native Client (i.e., build the module with one of | 476 plugin, you need to port it to Native Client (i.e., build the module with one of |
477 the toolchains in the NaCl SDK so that the module runs in Native Client). For | 477 the toolchains in the NaCl SDK so that the module runs in Native Client). For |
478 details on this advanced development technique, see <a class="reference external
" href="http://www.chromium.org/nativeclient/how-tos/debugging-documentation/deb
ugging-a-trusted-plugin">Debugging a Trusted Plugin</a>. | 478 details on this advanced development technique, see <a class="reference external
" href="http://www.chromium.org/nativeclient/how-tos/debugging-documentation/deb
ugging-a-trusted-plugin">Debugging a Trusted Plugin</a>. |
479 Note that starting with the <code>pepper_22</code> bundle, the NaCl SDK for Wind
ows | 479 Note that starting with the <code>pepper_22</code> bundle, the NaCl SDK for Wind
ows |
480 includes pre-built libraries and library source code, making it much easier to | 480 includes pre-built libraries and library source code, making it much easier to |
481 build a module into a .DLL.</p> | 481 build a module into a .DLL.</p> |
482 </section> | 482 </section> |
483 | 483 |
484 {{/partials.standard_nacl_article}} | 484 {{/partials.standard_nacl_article}} |
OLD | NEW |