[Lldb-commits] [lldb] 1aac34a - [lldb][PlatformDarwin][NFC] Use formatv-style format string in LocateExecutableScriptingResourcesFromDSYM (#185622)

via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 10 04:49:44 PDT 2026


Author: Michael Buch
Date: 2026-03-10T11:49:39Z
New Revision: 1aac34a1b7cbfa2970184771eefb105e7d0aead1

URL: https://github.com/llvm/llvm-project/commit/1aac34a1b7cbfa2970184771eefb105e7d0aead1
DIFF: https://github.com/llvm/llvm-project/commit/1aac34a1b7cbfa2970184771eefb105e7d0aead1.diff

LOG: [lldb][PlatformDarwin][NFC] Use formatv-style format string in LocateExecutableScriptingResourcesFromDSYM (#185622)

About to make changes in this area and using `formatv` instead of
`printf` style format specifiers makes those easier to follow.

Added: 
    

Modified: 
    lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
index bfe85899690ab..a7e28eb1bcc7e 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -229,12 +229,13 @@ FileSpecList PlatformDarwin::LocateExecutableScriptingResourcesFromDSYM(
     // .dSYM/Contents/Resources/DWARF/<basename> let us go to
     // .dSYM/Contents/Resources/Python/<basename>.py and see if the
     // file exists
-    path_string.Printf("%s/../Python/%s.py",
-                       symfile_spec.GetDirectory().GetCString(),
-                       module_basename.c_str());
-    original_path_string.Printf("%s/../Python/%s.py",
-                                symfile_spec.GetDirectory().GetCString(),
-                                original_module_basename.c_str());
+    path_string.Format("{0}/../Python/{1}.py",
+                       symfile_spec.GetDirectory().GetStringRef(),
+                       module_basename);
+    original_path_string.Format("{0}/../Python/{1}.py",
+                                symfile_spec.GetDirectory().GetStringRef(),
+                                original_module_basename);
+
     FileSpec script_fspec(path_string.GetString());
     FileSystem::Instance().Resolve(script_fspec);
     FileSpec orig_script_fspec(original_path_string.GetString());


        


More information about the lldb-commits mailing list