Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>In Xcode 4.6, lldb's <code>l</code> alias is a simple shortcut for <code>source list</code>.</p> <p>In the top of tree sources, this has been improved to behave more like gdb. If you look at <code>source/Interpreter/CommandInterpreter.cpp</code> over at <a href="http://lldb.llvm.org/" rel="nofollow noreferrer">http://lldb.llvm.org/</a> you'll see that <code>l</code> is now a regular expression command alias with these cases:</p> <pre><code>if (list_regex_cmd_ap-&gt;AddRegexCommand("^([0-9]+)[[:space:]]*$", "source list --line %1") &amp;&amp; list_regex_cmd_ap-&gt;AddRegexCommand("^(.*[^[:space:]])[[:space:]]*:[[:space:]]*([[:digit:]]+)[[:space:]]*$", "source list --file '%1' --line %2") &amp;&amp; list_regex_cmd_ap-&gt;AddRegexCommand("^\\*?(0x[[:xdigit:]]+)[[:space:]]*$", "source list --address %1") &amp;&amp; list_regex_cmd_ap-&gt;AddRegexCommand("^-[[:space:]]*$", "source list --reverse") &amp;&amp; list_regex_cmd_ap-&gt;AddRegexCommand("^-([[:digit:]]+)[[:space:]]*$", "source list --reverse --count %1") &amp;&amp; list_regex_cmd_ap-&gt;AddRegexCommand("^(.+)$", "source list --name \"%1\"") &amp;&amp; list_regex_cmd_ap-&gt;AddRegexCommand("^$", "source list")) </code></pre> <p>With these cases, you will get behavior like this:</p> <p>Show current frame:</p> <pre><code>(lldb) f #0: 0x0000000100000f2b a.out`main + 27 at a.c:15 12 13 14 -&gt; 15 puts ("hi"); // line 15 16 17 puts ("hi"); // line 17 18 } </code></pre> <p>show previous ten lines:</p> <pre><code>(lldb) l - 5 6 7 8 9 puts ("hi"); // line 9 10 11 </code></pre> <p>You can also use the <code>stop-line-count-after</code> and <code>stop-line-count-before</code> settings to control how much source context is displayed at frame stops.</p> <p>Note that you can create your own regular expression command alias in your <code>~/.lldbinit</code> file with the same behavior as the top-of-tree lldb's <code>l</code>. See <code>help command regex</code> for the syntax and an example.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload