[lldb] [Process/FreeBSD] Ensure that errors are always handled
authorMichał Górny <mgorny@moritz.systems>
Thu, 11 Feb 2021 23:51:42 +0000 (00:51 +0100)
committerMichał Górny <mgorny@moritz.systems>
Tue, 16 Feb 2021 21:21:37 +0000 (22:21 +0100)
Ensure that the llvm::Error instances are always considered handled
by replacing LLDB_LOG with LLDB_LOG_ERROR.

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

lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp

index 10fafe6..44797cd 100644 (file)
@@ -213,8 +213,9 @@ void NativeProcessFreeBSD::MonitorSIGTRAP(lldb::pid_t pid) {
       llvm::Error error = t.CopyWatchpointsFrom(
           static_cast<NativeThreadFreeBSD &>(*GetCurrentThread()));
       if (error) {
-        LLDB_LOG(log, "failed to copy watchpoints to new thread {0}: {1}",
-                 info.pl_lwpid, llvm::toString(std::move(error)));
+        LLDB_LOG_ERROR(log, std::move(error),
+                       "failed to copy watchpoints to new thread {1}: {0}",
+                       info.pl_lwpid);
         SetState(StateType::eStateInvalid);
         return;
       }