[Lldb-commits] [PATCH] D95100: [lldb/Commands] Fix short option collision for `process launch`

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jan 20 15:07:27 PST 2021


mib created this revision.
mib added reviewers: JDevlieghere, jingham, teemperor.
Herald added a subscriber: dang.
mib requested review of this revision.
Herald added a project: LLDB.

This patch changes the short option used in the
CommandOptionsProcessLaunch for the `-v|--environment` command option to
`-V|--environment`.

The reason for that is, that it collides with the `-v|----structured-data-value`
command option generated by `OptionGroupPythonClassWithDict` that
I'm using in an upcoming patch for the `process launch` command.

The long option `--environment` remains the same.

Signed-off-by: Med Ismail Bennani <medismail.bennani at gmail.com>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95100

Files:
  lldb/docs/use/map.rst
  lldb/source/Commands/CommandOptionsProcessLaunch.cpp
  lldb/source/Commands/Options.td


Index: lldb/source/Commands/Options.td
===================================================================
--- lldb/source/Commands/Options.td
+++ lldb/source/Commands/Options.td
@@ -655,7 +655,7 @@
     Desc<"Set the current working directory to <path> when running the inferior.">;
   def process_launch_arch : Option<"arch", "a">, Arg<"Architecture">,
     Desc<"Set the architecture for the process to launch when ambiguous.">;
-  def process_launch_environment : Option<"environment", "v">,
+  def process_launch_environment : Option<"environment", "V">,
     Arg<"None">, Desc<"Specify an environment variable name/value string "
     "(--environment NAME=VALUE). Can be specified multiple times for subsequent "
     "environment entries.">;
Index: lldb/source/Commands/CommandOptionsProcessLaunch.cpp
===================================================================
--- lldb/source/Commands/CommandOptionsProcessLaunch.cpp
+++ lldb/source/Commands/CommandOptionsProcessLaunch.cpp
@@ -130,7 +130,7 @@
       launch_info.SetShell(HostInfo::GetDefaultShell());
     break;
 
-  case 'v':
+  case 'V':
     launch_info.GetEnvironment().insert(option_arg);
     break;
 
Index: lldb/docs/use/map.rst
===================================================================
--- lldb/docs/use/map.rst
+++ lldb/docs/use/map.rst
@@ -199,7 +199,7 @@
                <td class="content">
                </td>
                <td class="content">
-                  <b>(lldb)</b> process launch -v DEBUG=1
+                  <b>(lldb)</b> process launch -V DEBUG=1
                   <br>
                </td>
          </tr>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95100.318025.patch
Type: text/x-patch
Size: 1622 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210120/b9f31891/attachment-0001.bin>


More information about the lldb-commits mailing list