[Lldb-commits] [lldb] 0ccc4de - [lldb] Always log if acquiring packet sequence mutex fails

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 24 12:25:04 PDT 2020


Author: Raphael Isemann
Date: 2020-03-24T20:24:50+01:00
New Revision: 0ccc4de42eae92d5a7a1b67b29d7921c7f144b8d

URL: https://github.com/llvm/llvm-project/commit/0ccc4de42eae92d5a7a1b67b29d7921c7f144b8d
DIFF: https://github.com/llvm/llvm-project/commit/0ccc4de42eae92d5a7a1b67b29d7921c7f144b8d.diff

LOG: [lldb] Always log if acquiring packet sequence mutex fails

Summary:
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.

Reviewers: #lldb, labath

Reviewed By: labath

Subscribers: JDevlieghere

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
index edbd408622f1..fdf1397d7a69 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
@@ -2797,12 +2797,10 @@ size_t GDBRemoteCommunicationClient::GetCurrentThreadIDs(
       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();


        


More information about the lldb-commits mailing list