[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 17:28:01 PST 2021


mib updated this revision to Diff 318072.
mib added a comment.

Changed short option to `-E|--environment` as @jingham suggested it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95100/new/

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", "E">,
     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 'E':
     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 -E DEBUG=1
                   <br>
                </td>
          </tr>


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


More information about the lldb-commits mailing list