[Lldb-commits] [PATCH] D76698: [lldb] Always log if acquiring packet sequence mutex fails

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 24 06:24:58 PDT 2020


teemperor created this revision.
teemperor added a reviewer: LLDB.
Herald added a subscriber: JDevlieghere.

Currently we only log in debug builds but I don't see why we would do this as this is neither
expensive and seems useful.

I looked into the git history of this code and it seems originally there was also an assert here
and the logging here was the #else branch branch for non-Debug builds.


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D76698

Files:
  lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp


Index: lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
===================================================================
--- lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -2797,12 +2797,10 @@
       thread_ids.push_back(1);
     }
   } else {
-#if !defined(LLDB_CONFIGURATION_DEBUG)
     Log *log(ProcessGDBRemoteLog::GetLogIfAnyCategoryIsSet(GDBR_LOG_PROCESS |
                                                            GDBR_LOG_PACKETS));
-    LLDB_LOGF(log, "error: failed to get packet sequence mutex, not sending "
-                   "packet 'qfThreadInfo'");
-#endif
+    LLDB_LOG(log, "error: failed to get packet sequence mutex, not sending "
+                  "packet 'qfThreadInfo'");
     sequence_mutex_unavailable = true;
   }
   return thread_ids.size();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76698.252290.patch
Type: text/x-patch
Size: 903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200324/f2f270f1/attachment.bin>


More information about the lldb-commits mailing list