<div dir="ltr"><div>I'm in a room with several folks that work on Linux and Mac. One of the major complaints with lldb is the command syntax when switching between the two debuggers. Currently, everyone prefers the gdb syntax. I'm sure a large part of that is due to knowing gdb after using it for so long, but also because some of the commands are much simpler. "ptype Point" vs. "image lookup --type Point", "info symbol 0x1234" vs. "image lookup --address 0x1234", etc. I'm sure there are other folks dealing with this issue when they move to lldb from gdb, and there appear to be several gdb --> lldb aliases already built into lldb - I assume to help with this. So instead of having several different people each trying to solve this for themselves with local python scripts or init files and all the issues that come along with those, I was thinking it would useful to get some more gdb commands it into lldb. Ie, ones like "info" that are fairly simple and don't interfere with existing lldb commands. But we'll take a look at the .lldbinit file Jason mailed, python scripts, and if those don't work for us I'll investigate Enrico's multiword commands idea and possible local lldb modifications.<br>

<br>Thanks.<br></div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 22, 2013 at 8:50 PM, Yin Ma <span dir="ltr"><<a href="mailto:yin@affinic.com" target="_blank">yin@affinic.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Michael,<br>
<br>
I recommend this way also. Actually, we have already done this thing<br>
for our GUI for lldb. It is not hard at all.<br>
<span class="HOEnZb"><font color="#888888"><br>
Yin<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
-----Original Message-----<br>
From: <a href="mailto:lldb-dev-bounces@cs.uiuc.edu">lldb-dev-bounces@cs.uiuc.edu</a> [mailto:<a href="mailto:lldb-dev-bounces@cs.uiuc.edu">lldb-dev-bounces@cs.uiuc.edu</a>] On Behalf Of Greg Clayton<br>
Sent: Tuesday, October 22, 2013 5:58 PM<br>
To: Michael Sartain<br>
Cc: <a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
Subject: Re: [lldb-dev] Command Aliases<br>
<br>
Just write a new python command and name it "info". Then re-route as needed under the covers.<br>
<br>
<br>
On Oct 22, 2013, at 5:53 PM, Michael Sartain <<a href="mailto:mikesart@gmail.com">mikesart@gmail.com</a>> wrote:<br>
<br>
> I'd really like to add aliases for the following commands from gdb:<br>
><br>
> info b[reak]                  ; breakpoint list<br>
> info ar[gs]                   ; frame variable<br>
> info lo[cals]                 ; frame variable --no-args<br>
> info r[egisters]              ; info registers<br>
> info al[l-registers]          ; info all-registers $rax $rcx<br>
> info all-registers rax rsp    ; register read rax rsp<br>
> info sh[ared]                 ; image list<br>
> info sy[mbol] 0x1234          ; image lookup --address 0x1234<br>
><br>
> These all have spaces in them, which I believe means they won't work with the existing alias system. Would it make the most sense to add a new "CommandObjectMultiwordInfo" object in the Command Interpreter and break all the info stuff out there, or is it feasible to add the ability to recognize multiword aliases so something like this would work:<br>


><br>
>     command alias "info break" breakpoint list<br>
><br>
> Also, it appears that command regex commands don't show up in help -a. See example down below. Is this expected behavior?<br>
> Thanks!<br>
>  -Mike<br>
><br>
> (lldb) help command regex<br>
> ...<br>
> EXAMPLES<br>
>     (lldb) command regex f s/^$/finish/ 's/([0-9]+)/frame select %1/'<br>
> (lldb) command regex f s/^$/finish/ 's/([0-9]+)/frame select %1/'<br>
> (lldb) help -a<br>
> ...<br>
> expression        -- Evaluate a C/ObjC/C++ expression in the current program context, using user defined variables and variables currently in scope.<br>
> f                 --<br>
> frame             -- A set of commands for operating on the current thread's frames.<br>
> ...<br>
> (lldb) help f<br>
>      This command takes 'raw' input (no need to quote stuff).<br>
><br>
> Syntax: f<br>
><br>
> 'f' is an abbreviation for 'f'<br>
> _______________________________________________<br>
> lldb-dev mailing list<br>
> <a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
<br>
_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
<br>
</div></div></blockquote></div><br></div></div></div></div></div>