| OLD | NEW |
| 1 .. _devcycle-debugging: | 1 .. _devcycle-debugging: |
| 2 | 2 |
| 3 ######### | 3 ######### |
| 4 Debugging | 4 Debugging |
| 5 ######### | 5 ######### |
| 6 | 6 |
| 7 This document describes tools and techniques you can use to debug, monitor, | 7 This document describes tools and techniques you can use to debug, monitor, |
| 8 and measure your application's performance. | 8 and measure your application's performance. |
| 9 | 9 |
| 10 .. contents:: Table Of Contents | 10 .. contents:: Table Of Contents |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 215 |
| 216 .. _debugging_pnacl_pexes: | 216 .. _debugging_pnacl_pexes: |
| 217 | 217 |
| 218 Debugging PNaCl pexes (with Pepper 35+) | 218 Debugging PNaCl pexes (with Pepper 35+) |
| 219 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 219 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 220 | 220 |
| 221 If you want to use GDB to debug a program that is compiled with the PNaCl | 221 If you want to use GDB to debug a program that is compiled with the PNaCl |
| 222 toolchain, you must have a copy of the pexe from **before** running | 222 toolchain, you must have a copy of the pexe from **before** running |
| 223 ``pnacl-finalize``. The ``pnacl-finalize`` tool converts LLVM bitcode | 223 ``pnacl-finalize``. The ``pnacl-finalize`` tool converts LLVM bitcode |
| 224 to the stable PNaCl bitcode format, but it also strips out debug | 224 to the stable PNaCl bitcode format, but it also strips out debug |
| 225 metadata, which we need for debugging. | 225 metadata, which we need for debugging. In this section we'll give the |
| 226 LLVM bitcode file a ``.bc`` file extension, and the PNaCl bitcode file |
| 227 a ``.pexe`` file extension. The actual extension should not matter, but |
| 228 it helps distinguish between the two types of files. |
| 226 | 229 |
| 227 **Note** unlike the finalized copy of the pexe, the non-finalized debug copy | 230 **Note** unlike the finalized copy of the pexe, the non-finalized debug copy |
| 228 is not considered stable. This means that a debug copy of the PNaCl | 231 is not considered stable. This means that a debug copy of the PNaCl |
| 229 application created by a Pepper N SDK is only guaranteed to run | 232 application created by a Pepper N SDK is only guaranteed to run |
| 230 with a matching Chrome version N. If the version of the debug bitcode pexe | 233 with a matching Chrome version N. If the version of the debug bitcode pexe |
| 231 does not match that of Chrome then the translation process may fail, and | 234 does not match that of Chrome then the translation process may fail, and |
| 232 you will see and error message in the JavaScript console. | 235 you will see and error message in the JavaScript console. |
| 233 | 236 |
| 234 Also, make sure you are passing the ``-g`` :ref:`compile option | 237 Also, make sure you are passing the ``-g`` :ref:`compile option |
| 235 <compile_flags>` to ``pnacl-clang`` to enable generating debugging info. | 238 <compile_flags>` to ``pnacl-clang`` to enable generating debugging info. |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 <http://www.chromium.org/nativeclient>`_ that describe how to do profiling on | 591 <http://www.chromium.org/nativeclient>`_ that describe how to do profiling on |
| 589 `64-bit Windows | 592 `64-bit Windows |
| 590 <https://sites.google.com/a/chromium.org/dev/nativeclient/how-tos/profiling-nacl
-apps-on-64-bit-windows>`_ | 593 <https://sites.google.com/a/chromium.org/dev/nativeclient/how-tos/profiling-nacl
-apps-on-64-bit-windows>`_ |
| 591 and `Linux | 594 and `Linux |
| 592 <http://www.chromium.org/nativeclient/how-tos/limited-profiling-with-oprofile-on
-x86-64>`_ | 595 <http://www.chromium.org/nativeclient/how-tos/limited-profiling-with-oprofile-on
-x86-64>`_ |
| 593 machines. | 596 machines. |
| 594 | 597 |
| 595 | 598 |
| 596 .. |menu-icon| image:: /images/menu-icon.png | 599 .. |menu-icon| image:: /images/menu-icon.png |
| 597 .. |puzzle| image:: /images/puzzle.png | 600 .. |puzzle| image:: /images/puzzle.png |
| OLD | NEW |