[Lldb-commits] [PATCH] D121155: [lldb] Add --exists flag to `settings set`

Jim Ingham via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 8 15:48:26 PST 2022


jingham accepted this revision.
jingham added a comment.
This revision is now accepted and ready to land.

I suggested what seems to me a slightly clearer error message, but the added option seems useful.  I wondered briefly about whether it might be better as a setting `settings set ignore-missing-settings` but decided that would make it too easy to overlook errors.  It's better to do it explicitly for settings you know don't exist in all the the versions of lldb you are likely to be running against.



================
Comment at: lldb/source/Commands/Options.td:26
+  def setset_exists : Option<"exists", "e">,
+    Desc<"Only set the setting if it exists. Don't print an error otherwise.">;
 }
----------------
It might be clearer to phrase it focusing on not raising an error if the setting doesn't exist like:

Set the setting if it exists, but do not cause the command to raise an error if it does not exist.  



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

https://reviews.llvm.org/D121155



More information about the lldb-commits mailing list