[Lldb-commits] [lldb] 48207b2 - Fix "settings set -g" so it works again.
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Tue Dec 28 11:03:27 PST 2021
Author: Greg Clayton
Date: 2021-12-28T11:03:09-08:00
New Revision: 48207b2559c6b012ce167f2e76acea39e9d405cf
URL: https://github.com/llvm/llvm-project/commit/48207b2559c6b012ce167f2e76acea39e9d405cf
DIFF: https://github.com/llvm/llvm-project/commit/48207b2559c6b012ce167f2e76acea39e9d405cf.diff
LOG: Fix "settings set -g" so it works again.
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.
Reviewed By: JDevlieghere
Differential Revision: https://reviews.llvm.org/D116012
Added:
Modified:
lldb/source/Commands/Options.td
lldb/test/Shell/Settings/TestSettingsSet.test
Removed:
################################################################################
diff --git a/lldb/source/Commands/Options.td b/lldb/source/Commands/Options.td
index 3e89eb0f6bda1..7fbf0ab039953 100644
--- a/lldb/source/Commands/Options.td
+++ b/lldb/source/Commands/Options.td
@@ -18,8 +18,7 @@ let Command = "help" in {
}
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.">;
diff --git a/lldb/test/Shell/Settings/TestSettingsSet.test b/lldb/test/Shell/Settings/TestSettingsSet.test
index 3006a694a16b2..8e90c00c77c2a 100644
--- a/lldb/test/Shell/Settings/TestSettingsSet.test
+++ b/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
More information about the lldb-commits
mailing list