Adds a few more aliases to the lldb translations.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 40041 Build 40116: arc lint + arc unit
Event Timeline
I think the reason why the gdb aliases aren't mentioned here is that intent was to train users in LLDB's more regular command syntax. That said, personally I wouldn't mind documenting them.
Thanks. I thought this was reasonable since the documentation shows many uses of lldb aliases already.
intent was to train users in LLDB's more regular command syntax
lldb's aliases, especially the regex ones, are great. In my experience, people prefer aliases, they're quick to type and often easier to remember :) I think it's great that lldb has both regular syntax and aliases, people can pick what suits them.
fwiw I have a python command called abbrev that takes a command and shows you the alias you can use instead.
(lldb) abbrev mem read -s 8 -c 10 -f x 0xfedcba00 x/10xg 0xfedcba00 (lldb) abbrev break set -f foo.c -l 123 b foo.c:23 (lldb) abbrev thread jump --by 3 j +3
I have no objection to documenting the aliases we have. Having the ability to define shortcuts for common operations was one of the key pieces that allowed the straight command set to be laid out in an orderly fashion, which I think is great for discoverability. It's really hard to do the latter and not have some commands be overly long to type. This gives us the best of both worlds.
I personally am a little less fond of the complex regex commands, particularly ones like "b" that become their own little DSL and now you have to try to decode it's operations from looking at the regex matcher to figure out what is actually going to happen. But I don't think I'm in the majority in that opinion.
It's a bit of a shame that our "list of aliases" is available as a gdb->lldb table. The table is actually arranged by task, so it serves as a pretty good task -> full & short-cut lldb commands, but you wouldn't think to use it for that purpose if you were not a gdb user. And it's a bit weird to have things in the table that don't have gdb equivalents. I wonder if it is time to take the gdb commands out and just make this a task -> lldb commands table?
But anyway, these changes are fine.
The abbrev script sounds cool. We have a bunch of useful Python examples in examples/Python, this sounds like a perfect candidate for that if you are free to contribute it. We should figure out a mechanism to test and package the appropriate ones of these utilities with lldb distributions, not everything in lldb has to be built in...
I wonder if it is time to take the gdb commands out and just make this a task -> lldb commands table?
+1 from me
The abbrev script sounds cool. We have a bunch of useful Python examples in examples/Python, this sounds like a perfect candidate for that if you are free to contribute it. We should figure out a mechanism to test and package the appropriate ones of these utilities with lldb distributions, not everything in lldb has to be built in...
Sounds interesting, and I yes can contribute it. I'll have a look at examples/Python and follow up.