[Lldb-commits] [PATCH] D116012: Fix "settings set -g" so it works again.

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Dec 19 19:11:34 PST 2021


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

When we switched options over to use the Options.td file, a bug was introduced that caused the "-g" option for "settings set" to require a filename arguemnt. This patch fixes this issue and adds a test so this doesn't regress.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116012

Files:
  lldb/source/Commands/Options.td
  lldb/test/Shell/Settings/TestSettingsSet.test


Index: lldb/test/Shell/Settings/TestSettingsSet.test
===================================================================
--- lldb/test/Shell/Settings/TestSettingsSet.test
+++ lldb/test/Shell/Settings/TestSettingsSet.test
@@ -3,6 +3,11 @@
 # Check that setting an empty value with -f(orce) clears the value.
 # RUN: not %lldb -b -s %s 2>&1 | FileCheck %s
 
+# Make sure that "settings set -g" no longer requires a bogus filename.
+settings set -g target.skip-prologue false
+settings show target.skip-prologue
+# CHECK: target.skip-prologue (boolean) = false
+
 settings set tab-size 16
 settings show tab-size
 # CHECK: tab-size (unsigned) = 16
Index: lldb/source/Commands/Options.td
===================================================================
--- lldb/source/Commands/Options.td
+++ lldb/source/Commands/Options.td
@@ -18,8 +18,7 @@
 }
 
 let Command = "settings set" in {
-  def setset_global : Option<"global", "g">, Arg<"Filename">,
-    Completion<"DiskFile">,
+  def setset_global : Option<"global", "g">,
     Desc<"Apply the new value to the global default value.">;
   def setset_force : Option<"force", "f">,
     Desc<"Force an empty value to be accepted as the default.">;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116012.395363.patch
Type: text/x-patch
Size: 1193 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20211220/07864273/attachment.bin>


More information about the lldb-commits mailing list