[llvm-branch-commits] [lldb] 21eeef5 - Revert "[lldb] Show target.debug-file-search-paths setting from python SBDeb…"

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Mar 21 05:54:02 PDT 2025


Author: Ebuka Ezike
Date: 2025-03-21T12:53:58Z
New Revision: 21eeef598376abdf6cd2af6e674948a80eacb8ef

URL: https://github.com/llvm/llvm-project/commit/21eeef598376abdf6cd2af6e674948a80eacb8ef
DIFF: https://github.com/llvm/llvm-project/commit/21eeef598376abdf6cd2af6e674948a80eacb8ef.diff

LOG: Revert "[lldb] Show target.debug-file-search-paths setting from  python SBDeb…"

This reverts commit 4b419840c883b0de03ae72c7d352c37f24c1932c.

Added: 
    

Modified: 
    lldb/include/lldb/Interpreter/OptionValueFileSpecList.h
    lldb/include/lldb/Utility/FileSpec.h
    lldb/source/Interpreter/OptionValueFileSpecList.cpp
    lldb/source/Utility/FileSpec.cpp
    lldb/test/API/commands/settings/TestSettings.py

Removed: 
    


################################################################################
diff  --git a/lldb/include/lldb/Interpreter/OptionValueFileSpecList.h b/lldb/include/lldb/Interpreter/OptionValueFileSpecList.h
index 200ce701cb922..bda6b5071d599 100644
--- a/lldb/include/lldb/Interpreter/OptionValueFileSpecList.h
+++ b/lldb/include/lldb/Interpreter/OptionValueFileSpecList.h
@@ -33,8 +33,6 @@ class OptionValueFileSpecList
   void DumpValue(const ExecutionContext *exe_ctx, Stream &strm,
                  uint32_t dump_mask) override;
 
-  llvm::json::Value ToJSON(const ExecutionContext *exe_ctx) override;
-
   Status
   SetValueFromString(llvm::StringRef value,
                      VarSetOperationType op = eVarSetOperationAssign) override;

diff  --git a/lldb/include/lldb/Utility/FileSpec.h b/lldb/include/lldb/Utility/FileSpec.h
index 3fa89b1dcff28..2e867b2b40b94 100644
--- a/lldb/include/lldb/Utility/FileSpec.h
+++ b/lldb/include/lldb/Utility/FileSpec.h
@@ -18,7 +18,6 @@
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/FormatVariadic.h"
-#include "llvm/Support/JSON.h"
 #include "llvm/Support/Path.h"
 
 #include <cstddef>
@@ -215,16 +214,6 @@ class FileSpec {
   ///     The stream to which to dump the object description.
   void Dump(llvm::raw_ostream &s) const;
 
-  /// Convert the filespec object to a json value.
-  ///
-  /// Convert the filespec object to a json value. If the object contains a
-  /// valid directory name, it will be displayed followed by a directory
-  /// delimiter, and the filename.
-  ///
-  /// \return
-  ///     A json value representation of a filespec.
-  llvm::json::Value ToJSON() const;
-
   Style GetPathStyle() const;
 
   /// Directory string const get accessor.

diff  --git a/lldb/source/Interpreter/OptionValueFileSpecList.cpp b/lldb/source/Interpreter/OptionValueFileSpecList.cpp
index 84607eb8d0595..98f4938fc6c19 100644
--- a/lldb/source/Interpreter/OptionValueFileSpecList.cpp
+++ b/lldb/source/Interpreter/OptionValueFileSpecList.cpp
@@ -41,15 +41,6 @@ void OptionValueFileSpecList::DumpValue(const ExecutionContext *exe_ctx,
   }
 }
 
-llvm::json::Value
-OptionValueFileSpecList::ToJSON(const ExecutionContext *exe_ctx) {
-  std::lock_guard<std::recursive_mutex> lock(m_mutex);
-  llvm::json::Array array;
-  for (const auto &file_spec : m_current_value)
-    array.emplace_back(file_spec.ToJSON());
-  return array;
-}
-
 Status OptionValueFileSpecList::SetValueFromString(llvm::StringRef value,
                                                    VarSetOperationType op) {
   std::lock_guard<std::recursive_mutex> lock(m_mutex);

diff  --git a/lldb/source/Utility/FileSpec.cpp b/lldb/source/Utility/FileSpec.cpp
index bb2b8647342b8..4bebbc9ff175f 100644
--- a/lldb/source/Utility/FileSpec.cpp
+++ b/lldb/source/Utility/FileSpec.cpp
@@ -330,13 +330,6 @@ void FileSpec::Dump(llvm::raw_ostream &s) const {
     s << path_separator;
 }
 
-llvm::json::Value FileSpec::ToJSON() const {
-  std::string str;
-  llvm::raw_string_ostream stream(str);
-  this->Dump(stream);
-  return llvm::json::Value(std::move(str));
-}
-
 FileSpec::Style FileSpec::GetPathStyle() const { return m_style; }
 
 void FileSpec::SetDirectory(ConstString directory) {

diff  --git a/lldb/test/API/commands/settings/TestSettings.py b/lldb/test/API/commands/settings/TestSettings.py
index 6b89ff76a2900..d36e08875919a 100644
--- a/lldb/test/API/commands/settings/TestSettings.py
+++ b/lldb/test/API/commands/settings/TestSettings.py
@@ -1016,13 +1016,6 @@ def test_settings_api(self):
         settings_json = self.get_setting_json(setting_path)
         self.assertEqual(settings_json, setting_value)
 
-        # Test OptionValueFileSpec and OptionValueFileSpecList
-        setting_path = "target.debug-file-search-paths"
-        setting_value = ["/tmp" "/tmp2"]
-        self.runCmd("settings set %s %s" % (setting_path, " ".join(setting_value)))
-        settings_json = self.get_setting_json(setting_path)
-        self.assertEqual(settings_json, setting_value)
-
         # Test OptionValueFormatEntity
         setting_value = """thread #${thread.index}{, name = \\'${thread.name}\\
         '}{, queue = ${ansi.fg.green}\\'${thread.queue}\\'${ansi.normal}}{,


        


More information about the llvm-branch-commits mailing list