[Lldb-commits] [lldb] r372485 - [LLDB] Use SetErrorStringWithFormatv for cases that use LLVM style format strings

Martin Storsjo via lldb-commits lldb-commits at lists.llvm.org
Sat Sep 21 12:10:00 PDT 2019


Author: mstorsjo
Date: Sat Sep 21 12:10:00 2019
New Revision: 372485

URL: http://llvm.org/viewvc/llvm-project?rev=372485&view=rev
Log:
[LLDB] Use SetErrorStringWithFormatv for cases that use LLVM style format strings

SetErrorStringWithFormat only supports normal printf style format
strings.

Differential Revision: https://reviews.llvm.org/D67862

Modified:
    lldb/trunk/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
    lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp

Modified: lldb/trunk/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp?rev=372485&r1=372484&r2=372485&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/NativeProcessWindows.cpp Sat Sep 21 12:10:00 2019
@@ -177,9 +177,9 @@ Status NativeProcessWindows::Detach() {
     else
       LLDB_LOG(log, "Detaching process error: {0}", error);
   } else {
-    error.SetErrorStringWithFormat("error: process {0} in state = {1}, but "
-                                   "cannot detach it in this state.",
-                                   GetID(), state);
+    error.SetErrorStringWithFormatv("error: process {0} in state = {1}, but "
+                                    "cannot detach it in this state.",
+                                    GetID(), state);
     LLDB_LOG(log, "error: {0}", error);
   }
   return error;

Modified: lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp?rev=372485&r1=372484&r2=372485&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Windows/Common/ProcessWindows.cpp Sat Sep 21 12:10:00 2019
@@ -170,9 +170,9 @@ Status ProcessWindows::DoDetach(bool kee
     else
       LLDB_LOG(log, "Detaching process error: {0}", error);
   } else {
-    error.SetErrorStringWithFormat("error: process {0} in state = {1}, but "
-                                   "cannot detach it in this state.",
-                                   GetID(), private_state);
+    error.SetErrorStringWithFormatv("error: process {0} in state = {1}, but "
+                                    "cannot detach it in this state.",
+                                    GetID(), private_state);
     LLDB_LOG(log, "error: {0}", error);
   }
   return error;




More information about the lldb-commits mailing list