[Lldb-commits] [PATCH] D61737: [lldb] add -ex CLI option as alias to --one-line

Konrad Wilhelm Kleine via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu May 9 08:40:59 PDT 2019


kwk created this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

To ease the adoption of LLDB for users coming from GDB, I've added the
command line option `-ex` to the `lldb` binary. It is an alias the the
`--one-line` option which

> Tells the debugger to execute this one-line lldb command after any
>  file provided on the command line has been loaded.

This is probably as close as we can get to `gdb`'s `-ex` option which
had this documentation:

> -ex command
> 
>   Execute given GDB command.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D61737

Files:
  lldb/tools/driver/Options.td


Index: lldb/tools/driver/Options.td
===================================================================
--- lldb/tools/driver/Options.td
+++ lldb/tools/driver/Options.td
@@ -159,6 +159,10 @@
   Alias<one_line>,
   HelpText<"Alias for --one-line">,
   Group<grp_command>;
+def: Separate<["-"], "ex">,
+  Alias<one_line>,
+  HelpText<"Alias for --one-line. This exists just to ease adoption of LLDB for GDB users.">,
+  Group<grp_command>;
 
 def one_line_before_file: Separate<["--", "-"], "one-line-before-file">,
   MetaVarName<"<command>">,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61737.198840.patch
Type: text/x-patch
Size: 543 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190509/7662a209/attachment.bin>


More information about the lldb-commits mailing list