X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fnative_client_sdk%2Fdoc_generated%2Fdevguide%2Fdevcycle%2Fdebugging.html;h=adc9710fedd68951416639d5bd61b185286ca96f;hb=1afa4dd80ef85af7c90efaea6959db1d92330844;hp=7de09062884e3659717ca548155ea44ae0dcde39;hpb=90762837333c13ccf56f2ad88e4481fc71e8d281;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/native_client_sdk/doc_generated/devguide/devcycle/debugging.html b/src/native_client_sdk/doc_generated/devguide/devcycle/debugging.html index 7de0906..adc9710 100644 --- a/src/native_client_sdk/doc_generated/devguide/devcycle/debugging.html +++ b/src/native_client_sdk/doc_generated/devguide/devcycle/debugging.html @@ -16,23 +16,24 @@ and measure your application’s performance.
By default stdout and stderr will appear in Chrome’s stdout and stderr stream -but they can also be redirected as described below.
-chrome --user-data-dir=<newdir>
).
+You can redirect stdout and stderr to output files by setting these environment variables:
Also, make sure you are passing the -g
compile option to pnacl-clang
to enable generating debugging info.
-You might also want to omit -O2
from the compile-time and link-time
-options, otherwise GDB not might be able to print variables’ values when
-debugging (this is more of a problem with the PNaCl/LLVM toolchain than
-with GCC).
Also, make sure you are passing the -g
compile option
+to pnacl-clang
to enable generating debugging info. You might also want to
+omit -O2
from the compile-time and link-time options, otherwise GDB not
+might be able to print variables’ values when debugging (this is more of a
+problem with the PNaCl/LLVM toolchain than with GCC).
Once you have built a non-stable debug copy of the pexe, list the URL of that copy in your application’s manifest file:
@@ -182,12 +188,13 @@ your local web server serves files from.When you run Chrome with
---enable-nacl-debug
, Chrome will translate and run thedebug_version.bc
instead ofrelease_version.pexe
. Once the debug version is loaded, you are ready to run nacl-gdbWhether you publish the NMF file containing the debug URL to the release -web server, is up to you. One reason to avoid publishing the debug URL -is that it is only guaranteed to work for the Chrome version that matches -the SDK version. Developers who may have left the
+--enable-nacl-debug
-flag turned on may end up loading the debug copy of your application -(which may or may not work, depending on their version of Chrome).Whether you publish the NMF file containing the debug URL to the +release web server, is up to you. One reason to avoid publishing the +debug URL is that it is only guaranteed to work for the Chrome version +that matches the SDK version. Developers who may have left the +
--enable-nacl-debug
flag turned on may end up loading the debug +copy of your application (which may or may not work, depending on +their version of Chrome).Debugging PNaCl pexes (with older Pepper toolchains)
If you want to use GDB to debug a program that is compiled with the PNaCl toolchain, you must convert the
pexe
file to anexe
. (You can skip @@ -197,8 +204,8 @@ pepper 35 or later.)
-g
compile option to pnacl-clang
to enable generating debugging info.
You might also want to omit -O2
from the compile-time and link-time
options.Secondly, use pnacl-translate
to convert your pexe
to one or more
-nexe
files. For example:
Secondly, use pnacl-translate
to convert your pexe
to one or more
nexe
files. For example:
nacl_sdk/pepper_<version>/toolchain/win_pnacl/bin/pnacl-translate \
--allow-llvm-bitcode-input hello_world.pexe -arch x86-32 \
@@ -466,10 +473,9 @@ Linux; .bundle files on Mac) are loaded directly in either the Chrome renderer
process or a separate plugin process, rather than in Native Client. Building a
module as a trusted Pepper plugin allows you to use standard debuggers and
development tools on your system, but when you’re finished developing the
-plugin, you need to port it to Native Client (i.e., build the module with one
-of the toolchains in the NaCl SDK so that the module runs in Native Client).
-For details on this advanced development technique, see Debugging a Trusted
-Plugin.
+plugin, you need to port it to Native Client (i.e., build the module with one of
+the toolchains in the NaCl SDK so that the module runs in Native Client). For
+details on this advanced development technique, see Debugging a Trusted Plugin.
Note that starting with the pepper_22
bundle, the NaCl SDK for Windows
includes pre-built libraries and library source code, making it much easier to
build a module into a .DLL.