[Lldb-commits] [lldb] r138423 - /lldb/trunk/www/varformats.html

Enrico Granata granata.enrico at gmail.com
Tue Aug 23 18:49:09 PDT 2011


Author: enrico
Date: Tue Aug 23 20:49:09 2011
New Revision: 138423

URL: http://llvm.org/viewvc/llvm-project?rev=138423&view=rev
Log:
Minor documentation changes (WIP)

Modified:
    lldb/trunk/www/varformats.html

Modified: lldb/trunk/www/varformats.html
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/www/varformats.html?rev=138423&r1=138422&r2=138423&view=diff
==============================================================================
--- lldb/trunk/www/varformats.html (original)
+++ lldb/trunk/www/varformats.html Tue Aug 23 20:49:09 2011
@@ -719,15 +719,23 @@
                             <b>(lldb)</b> type summary add --summary-string "${var%s}" "char *"
                         </td>
                 <table>
-                
-                This works for <code>char*</code> and <code>char[]</code> objects, and uses the
-                <code>\0</code> terminator
-                when possible to terminate the string, instead of relying on array length.
-                
-				</li>            </ul>
+                <p>
+				This syntax works for <code>char*</code> as well as for <code>char[]</code> 
+				because LLDB can rely on the final <code>\0</code> terminator to know when the string
+				has ended.</p>
+                LLDB has default summary strings for <code>char*</code> and <code>char[]</code> that use
+				this special case. On debugger startup, the following are defined automatically:
+				<table class="stats" width="620" cellspacing="0">
+                        <td class="content">
+                            <b>(lldb)</b> type summary add --summary-string "${var%s}" "char *"<br/>
+                            <b>(lldb)</b> type summary add --summary-string "${var%s}" -x "char \[[0-9]+]"<br/>
+                        </td>
+                <table>
+				</li>
+			</ul>
             <ul>
 
-				<li>anyone of the array formats (<code>int8_t[]</code>,
+				<li>any of the array formats (<code>int8_t[]</code>,
 				<code>float32{}</code>, ...), and the <code>y</code>, <code>Y</code>
 				and <code>a</code> formats
 				work to print an array of a non-aggregate





More information about the lldb-commits mailing list