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.">;
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.">;
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits