Author: Zequan Wu
Date: 2022-03-02T14:20:14-08:00
New Revision: 302d7179e101ebbf48c386a632828a1150a18769

URL: 
https://github.com/llvm/llvm-project/commit/302d7179e101ebbf48c386a632828a1150a18769
DIFF: 
https://github.com/llvm/llvm-project/commit/302d7179e101ebbf48c386a632828a1150a18769.diff

LOG: [LLDB] Add error message when using --show-variable-ranges without -v

Added: 
    

Modified: 
    lldb/source/Commands/CommandObjectTarget.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Commands/CommandObjectTarget.cpp 
b/lldb/source/Commands/CommandObjectTarget.cpp
index 3af2c73b113cb..39f3af7f6df26 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -3626,6 +3626,15 @@ class CommandObjectTargetModulesLookup : public 
CommandObjectParsed {
       m_print_all = false;
     }
 
+    Status OptionParsingFinished(ExecutionContext *execution_context) override 
{
+      Status status;
+      if (m_all_ranges && !m_verbose) {
+        status.SetErrorString("--show-variable-ranges must be used in "
+                              "conjunction with --verbose.");
+      }
+      return status;
+    }
+
     llvm::ArrayRef<OptionDefinition> GetDefinitions() override {
       return llvm::makeArrayRef(g_target_modules_lookup_options);
     }


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to