Moved from D74903
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Clearing all settings is a reasonable operation, so I don't have any problem with it per se. I'm just wondering, given that this is not something that one would want to do very often (and it can have catastrophic results), whether this operation should not be more explicit. "settings clear --all" for instance ? Adding @jingham for the interface aspects.
It would also be nice to add a test case for the new command.
lldb/source/Commands/CommandObjectSettings.cpp | ||
---|---|---|
1119–1122 | What will happen if I pass both --all and an actual setting argument. I think that should be an error. | |
lldb/test/API/commands/settings/TestSettings.py | ||
543–546 | This dependence on setUpCommands looks weird. Any way we can get rid of that? Maybe if we check the exact four settings that you modified before clear --all and verifying they have the correct (hardcoded) value? (and maybe not use the term-width setting, since the default value of that is unpredictable) |
Somehow this broke the macOS LLDB bot:
Failing Tests (2): lldb-api :: functionalities/inline-stepping/TestInlineStepping.py lldb-api :: lang/cpp/std-function-step-into-callable/TestStdFunctionStepIntoCallable.py
I guess now all the shady hacks are coming out. The following settings change their value after calling settings clear after startup in the test:
target.process.thread.step-avoid-regexp (regex) -> from '^std::' to empty string platform.module-cache-directory (file) -> from '"/Users/teemperor/.lldb/module_cache"' to empty string script-lang (enum) -> from 'default' to 'python'
Thank you for details, I'm looking at these failures, however, I'm not able to debug on the macOS.
Sure, I can take care of it. It seems OptionValueRegex::Clear is always resetting to an empty regex. I guess the same goes for the other option values that are failing.
platform.module-cache-directory should be fixed by rGfe74df01a909.
Regarding script-lang, its default value is eScriptLanguagePython in CoreProperties.td and I'm not sure that I should change it.
What will happen if I pass both --all and an actual setting argument. I think that should be an error.