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

Unified Diff: native_client_sdk/doc_generated/devguide/devcycle/debugging.html

Issue 618823003: Add debugging information for nacl_io library. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove file make keeps touching. Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/doc_generated/devguide/devcycle/debugging.html
diff --git a/native_client_sdk/doc_generated/devguide/devcycle/debugging.html b/native_client_sdk/doc_generated/devguide/devcycle/debugging.html
index 7de09062884e3659717ca548155ea44ae0dcde39..5174de0fcaeaefe62cee32f4592b4c9c3c0e1215 100644
--- a/native_client_sdk/doc_generated/devguide/devcycle/debugging.html
+++ b/native_client_sdk/doc_generated/devguide/devcycle/debugging.html
@@ -32,7 +32,12 @@ and measure your application&#8217;s performance.</p>
</li>
</ul>
</li>
-<li><a class="reference internal" href="#debugging-with-other-tools" id="id15">Debugging with other tools</a></li>
+<li><p class="first"><a class="reference internal" href="#non-standard-debugging" id="id15">Non-Standard Debugging</a></p>
+<ul class="small-gap">
+<li><a class="reference internal" href="#nacl-io" id="id16">nacl_io</a></li>
+<li><a class="reference internal" href="#alternative-debuggers" id="id17">Alternative Debuggers</a></li>
+</ul>
+</li>
</ul>
</div><h2 id="diagnostic-information">Diagnostic information</h2>
@@ -91,7 +96,7 @@ void errormsg(const char* pMsg){
</pre>
<p>By default stdout and stderr will appear in Chrome&#8217;s stdout and stderr stream
but they can also be redirected as described below.</p>
-<h4 id="redirecting-output-to-log-files">Redirecting output to log files</h4>
+<h4 id="redirecting-output-to-log-files"><span id="redirecting-output-to-log"></span>Redirecting output to log files</h4>
<p>You can redirect stdout and stderr to output files by setting these environment
variables:</p>
<ul class="small-gap">
@@ -457,7 +462,19 @@ comprehensive list of gdb commands. Note that you can abbreviate most commands
to just their first letter (<code>b</code> for break, <code>c</code> for continue, and so on).</p>
<p>To interrupt execution of your module, press &lt;Ctrl-c&gt;. When you&#8217;re done
debugging, close the Chrome window and type <code>q</code> to quit gdb.</p>
-<h2 id="debugging-with-other-tools">Debugging with other tools</h2>
+<h2 id="non-standard-debugging">Non-Standard Debugging</h2>
+<h3 id="nacl-io"><span id="nacl-io-debugging"></span>nacl_io</h3>
+<p>The logging system for the <a class="reference internal" href="/native-client/devguide/coding/nacl_io.html"><em>nacl_io library</em></a> writes
+directly to the <code>stderr</code> stream of the NaCl process. It deliberately bypasses
+the standard library functions implemented in nacl_io to avoid circular calls to
+itself.</p>
+<p>The stderr from the process is by default visible in the terminal that launched
+chrome (at least on mac and linux). Be sure that when you launch chrome it
+doesn&#8217;t attach to an existing instance. One simple way to do this is to pass a
+new directory to chrome as your user data directory (<code>chrome
+--user-data-dir=&lt;newdir&gt;</code>). It&#8217;s also possible to redirect the NaCl&#8217;s stderr to
+other places such as, for example, <a class="reference internal" href="#redirecting-output-to-log"><em>log files</em></a>.</p>
+<h3 id="alternative-debuggers">Alternative Debuggers</h3>
<p>If you cannot use the <a class="reference internal" href="#visual-studio"><em>Visual Studio add-in</em></a>, or you want
to use a debugger other than nacl-gdb, you must manually build your module as a
Pepper plugin (sometimes referred to as a &#8220;<a class="reference external" href="http://www.chromium.org/nativeclient/getting-started/getting-started-background-and-basics#TOC-Trusted-vs-Untrusted">trusted</a>&#8221;

Powered by Google App Engine
This is Rietveld 408576698