Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Side by Side Diff: native_client_sdk/doc_generated/devguide/devcycle/debugging.html

Issue 323163004: [NaCl SDK] docs: Introduce .bc vs .pexe naming convention before using that in doc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | native_client_sdk/src/doc/devguide/devcycle/debugging.rst » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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&#8217;s performance.</p> 6 and measure your application&#8217;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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 <p>Note that this same copy of GDB can be used to debug any NaCl program, 209 <p>Note that this same copy of GDB can be used to debug any NaCl program,
210 whether built using newlib or glibc for x86-32, x86-64 or ARM. In the SDK, 210 whether built using newlib or glibc for x86-32, x86-64 or ARM. In the SDK,
211 <code>i686-nacl-gdb</code> is an alias for <code>x86_64-nacl-gdb</code>, and the <code>newlib</code> 211 <code>i686-nacl-gdb</code> is an alias for <code>x86_64-nacl-gdb</code>, and the <code>newlib</code>
212 and <code>glibc</code> toolchains both contain the same version of GDB.</p> 212 and <code>glibc</code> toolchains both contain the same version of GDB.</p>
213 <section id="debugging-pnacl-pexes-with-pepper-35"> 213 <section id="debugging-pnacl-pexes-with-pepper-35">
214 <span id="debugging-pnacl-pexes"></span><h4 id="debugging-pnacl-pexes-with-peppe r-35"><span id="debugging-pnacl-pexes"></span>Debugging PNaCl pexes (with Pepper 35+)</h4> 214 <span id="debugging-pnacl-pexes"></span><h4 id="debugging-pnacl-pexes-with-peppe r-35"><span id="debugging-pnacl-pexes"></span>Debugging PNaCl pexes (with Pepper 35+)</h4>
215 <p>If you want to use GDB to debug a program that is compiled with the PNaCl 215 <p>If you want to use GDB to debug a program that is compiled with the PNaCl
216 toolchain, you must have a copy of the pexe from <strong>before</strong> running 216 toolchain, you must have a copy of the pexe from <strong>before</strong> running
217 <code>pnacl-finalize</code>. The <code>pnacl-finalize</code> tool converts LLVM bitcode 217 <code>pnacl-finalize</code>. The <code>pnacl-finalize</code> tool converts LLVM bitcode
218 to the stable PNaCl bitcode format, but it also strips out debug 218 to the stable PNaCl bitcode format, but it also strips out debug
219 metadata, which we need for debugging.</p> 219 metadata, which we need for debugging. In this section we&#8217;ll give the
220 LLVM bitcode file a <code>.bc</code> file extension, and the PNaCl bitcode file
221 a <code>.pexe</code> file extension. The actual extension should not matter, but
222 it helps distinguish between the two types of files.</p>
220 <p><strong>Note</strong> unlike the finalized copy of the pexe, the non-finalize d debug copy 223 <p><strong>Note</strong> unlike the finalized copy of the pexe, the non-finalize d debug copy
221 is not considered stable. This means that a debug copy of the PNaCl 224 is not considered stable. This means that a debug copy of the PNaCl
222 application created by a Pepper N SDK is only guaranteed to run 225 application created by a Pepper N SDK is only guaranteed to run
223 with a matching Chrome version N. If the version of the debug bitcode pexe 226 with a matching Chrome version N. If the version of the debug bitcode pexe
224 does not match that of Chrome then the translation process may fail, and 227 does not match that of Chrome then the translation process may fail, and
225 you will see and error message in the JavaScript console.</p> 228 you will see and error message in the JavaScript console.</p>
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. 229 <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 230 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&#8217; values when 231 options, otherwise GDB not might be able to print variables&#8217; values when
229 debugging (this is more of a problem with the PNaCl/LLVM toolchain than 232 debugging (this is more of a problem with the PNaCl/LLVM toolchain than
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 build a module into a .DLL.</p> 547 build a module into a .DLL.</p>
545 <section id="open-source-profiling-tools"> 548 <section id="open-source-profiling-tools">
546 <h3 id="open-source-profiling-tools">Open source profiling tools</h3> 549 <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 550 <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> 551 <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> 552 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> 553 machines.</p>
551 </section></section></section> 554 </section></section></section>
552 555
553 {{/partials.standard_nacl_article}} 556 {{/partials.standard_nacl_article}}
OLDNEW
« no previous file with comments | « no previous file | native_client_sdk/src/doc/devguide/devcycle/debugging.rst » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698