Skip to content

[debugserver] Remove PThreadMutex (NFC) #137555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 28, 2025

Conversation

JDevlieghere
Copy link
Member

Now that all uses of PThreadMutex have been migrated to their C++ equivalent, this PR removes PThreadMutex itself.

@llvmbot
Copy link
Member

llvmbot commented Apr 27, 2025

@llvm/pr-subscribers-lldb

Author: Jonas Devlieghere (JDevlieghere)

Changes

Now that all uses of PThreadMutex have been migrated to their C++ equivalent, this PR removes PThreadMutex itself.


Full diff: https://github.com/llvm/llvm-project/pull/137555.diff

9 Files Affected:

  • (modified) lldb/tools/debugserver/debugserver.xcodeproj/project.pbxproj (-8)
  • (modified) lldb/tools/debugserver/source/CMakeLists.txt (-1)
  • (modified) lldb/tools/debugserver/source/DNB.cpp (+2-2)
  • (modified) lldb/tools/debugserver/source/DNBError.cpp (-1)
  • (modified) lldb/tools/debugserver/source/MacOSX/MachException.cpp (-1)
  • (modified) lldb/tools/debugserver/source/MacOSX/MachException.h (-1)
  • (modified) lldb/tools/debugserver/source/MacOSX/MachTask.h (+5-6)
  • (removed) lldb/tools/debugserver/source/PThreadMutex.cpp (-66)
  • (removed) lldb/tools/debugserver/source/PThreadMutex.h (-119)
diff --git a/lldb/tools/debugserver/debugserver.xcodeproj/project.pbxproj b/lldb/tools/debugserver/debugserver.xcodeproj/project.pbxproj
index c25eabcbadab3..f0103008bb27f 100644
--- a/lldb/tools/debugserver/debugserver.xcodeproj/project.pbxproj
+++ b/lldb/tools/debugserver/debugserver.xcodeproj/project.pbxproj
@@ -36,7 +36,6 @@
 		26CE05BA115C363E0022F371 /* DNBLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637E00C71334A0024798E /* DNBLog.cpp */; };
 		26CE05BB115C363F0022F371 /* DNBRegisterInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637E20C71334A0024798E /* DNBRegisterInfo.cpp */; };
 		26CE05BC115C36420022F371 /* PThreadEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637FE0C71334A0024798E /* PThreadEvent.cpp */; };
-		26CE05BD115C36430022F371 /* PThreadMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2672DBEE0EEF446700E92059 /* PThreadMutex.cpp */; };
 		26CE05BE115C36440022F371 /* SysSignal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C638010C71334A0024798E /* SysSignal.cpp */; };
 		26CE05BF115C364D0022F371 /* DNBArchImplX86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26CF99A21142EB7400011AAB /* DNBArchImplX86_64.cpp */; };
 		26CE05C3115C36580022F371 /* CFString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2695DD9B0D3EC160007E4CA2 /* CFString.cpp */; };
@@ -65,7 +64,6 @@
 		456F67591AD46CE9002850C2 /* DNBLog.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637E00C71334A0024798E /* DNBLog.cpp */; };
 		456F675A1AD46CE9002850C2 /* DNBRegisterInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637E20C71334A0024798E /* DNBRegisterInfo.cpp */; };
 		456F675B1AD46CE9002850C2 /* PThreadEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C637FE0C71334A0024798E /* PThreadEvent.cpp */; };
-		456F675C1AD46CE9002850C2 /* PThreadMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2672DBEE0EEF446700E92059 /* PThreadMutex.cpp */; };
 		456F675D1AD46CE9002850C2 /* SysSignal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C638010C71334A0024798E /* SysSignal.cpp */; };
 		456F675E1AD46CE9002850C2 /* DNBArchImplX86_64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26CF99A21142EB7400011AAB /* DNBArchImplX86_64.cpp */; };
 		456F67621AD46CE9002850C2 /* CFString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2695DD9B0D3EC160007E4CA2 /* CFString.cpp */; };
@@ -102,7 +100,6 @@
 		26593A060D4931CC001C9FE3 /* ChangeLog */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ChangeLog; sourceTree = "<group>"; };
 		266B5ECF1460A68200E43F0A /* DNBArchImplARM64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DNBArchImplARM64.cpp; sourceTree = "<group>"; };
 		266B5ED01460A68200E43F0A /* DNBArchImplARM64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DNBArchImplARM64.h; sourceTree = "<group>"; };
-		2672DBEE0EEF446700E92059 /* PThreadMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PThreadMutex.cpp; sourceTree = "<group>"; };
 		2695DD910D3EBFF6007E4CA2 /* CFBundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CFBundle.cpp; sourceTree = "<group>"; };
 		2695DD920D3EBFF6007E4CA2 /* CFBundle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFBundle.h; sourceTree = "<group>"; };
 		2695DD9A0D3EC160007E4CA2 /* CFString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFString.h; sourceTree = "<group>"; };
@@ -151,7 +148,6 @@
 		26C637FD0C71334A0024798E /* PThreadCondition.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PThreadCondition.h; sourceTree = "<group>"; };
 		26C637FE0C71334A0024798E /* PThreadEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PThreadEvent.cpp; sourceTree = "<group>"; };
 		26C637FF0C71334A0024798E /* PThreadEvent.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PThreadEvent.h; sourceTree = "<group>"; };
-		26C638000C71334A0024798E /* PThreadMutex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = PThreadMutex.h; sourceTree = "<group>"; };
 		26C638010C71334A0024798E /* SysSignal.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SysSignal.cpp; sourceTree = "<group>"; };
 		26C638020C71334A0024798E /* SysSignal.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SysSignal.h; sourceTree = "<group>"; };
 		26C638050C71334A0024798E /* TTYState.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TTYState.cpp; sourceTree = "<group>"; };
@@ -284,8 +280,6 @@
 				26C637FD0C71334A0024798E /* PThreadCondition.h */,
 				26C637FF0C71334A0024798E /* PThreadEvent.h */,
 				26C637FE0C71334A0024798E /* PThreadEvent.cpp */,
-				26C638000C71334A0024798E /* PThreadMutex.h */,
-				2672DBEE0EEF446700E92059 /* PThreadMutex.cpp */,
 				233B4EA81D2DB96A00E98261 /* StringConvert.cpp */,
 				26C638020C71334A0024798E /* SysSignal.h */,
 				26C638010C71334A0024798E /* SysSignal.cpp */,
@@ -486,7 +480,6 @@
 				26CE05BA115C363E0022F371 /* DNBLog.cpp in Sources */,
 				26CE05BB115C363F0022F371 /* DNBRegisterInfo.cpp in Sources */,
 				26CE05BC115C36420022F371 /* PThreadEvent.cpp in Sources */,
-				26CE05BD115C36430022F371 /* PThreadMutex.cpp in Sources */,
 				26CE05BE115C36440022F371 /* SysSignal.cpp in Sources */,
 				26CE05BF115C364D0022F371 /* DNBArchImplX86_64.cpp in Sources */,
 				26CE05C5115C36590022F371 /* CFBundle.cpp in Sources */,
@@ -525,7 +518,6 @@
 				456F67591AD46CE9002850C2 /* DNBLog.cpp in Sources */,
 				456F675A1AD46CE9002850C2 /* DNBRegisterInfo.cpp in Sources */,
 				456F675B1AD46CE9002850C2 /* PThreadEvent.cpp in Sources */,
-				456F675C1AD46CE9002850C2 /* PThreadMutex.cpp in Sources */,
 				456F675D1AD46CE9002850C2 /* SysSignal.cpp in Sources */,
 				456F675E1AD46CE9002850C2 /* DNBArchImplX86_64.cpp in Sources */,
 				23043C9E1D35DBFA00FC25CA /* StringConvert.cpp in Sources */,
diff --git a/lldb/tools/debugserver/source/CMakeLists.txt b/lldb/tools/debugserver/source/CMakeLists.txt
index 1a433898f6aa4..f7ff76c3e8e84 100644
--- a/lldb/tools/debugserver/source/CMakeLists.txt
+++ b/lldb/tools/debugserver/source/CMakeLists.txt
@@ -203,7 +203,6 @@ set(lldbDebugserverCommonSources
   libdebugserver.cpp
   PseudoTerminal.cpp
   PThreadEvent.cpp
-  PThreadMutex.cpp
   RNBContext.cpp
   RNBRemote.cpp
   RNBServices.cpp
diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp
index 10c55dc3f769f..b1389ab8f8066 100644
--- a/lldb/tools/debugserver/source/DNB.cpp
+++ b/lldb/tools/debugserver/source/DNB.cpp
@@ -69,8 +69,8 @@ static ProcessMap *GetProcessMap(bool can_create) {
   static ProcessMap *g_process_map_ptr = NULL;
 
   if (can_create && g_process_map_ptr == NULL) {
-    static pthread_mutex_t g_process_map_mutex = PTHREAD_MUTEX_INITIALIZER;
-    PTHREAD_MUTEX_LOCKER(locker, &g_process_map_mutex);
+    static std::mutex g_process_map_mutex;
+    std::lock_guard<std::mutex> guard(g_process_map_mutex);
     if (g_process_map_ptr == NULL)
       g_process_map_ptr = new ProcessMap;
   }
diff --git a/lldb/tools/debugserver/source/DNBError.cpp b/lldb/tools/debugserver/source/DNBError.cpp
index 00933bce1a770..17690428341bf 100644
--- a/lldb/tools/debugserver/source/DNBError.cpp
+++ b/lldb/tools/debugserver/source/DNBError.cpp
@@ -13,7 +13,6 @@
 #include "DNBError.h"
 #include "CFString.h"
 #include "DNBLog.h"
-#include "PThreadMutex.h"
 
 #ifdef WITH_SPRINGBOARD
 #include <SpringBoardServices/SpringBoardServer.h>
diff --git a/lldb/tools/debugserver/source/MacOSX/MachException.cpp b/lldb/tools/debugserver/source/MacOSX/MachException.cpp
index 40450c2c9d1ff..618fce370d9eb 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachException.cpp
+++ b/lldb/tools/debugserver/source/MacOSX/MachException.cpp
@@ -15,7 +15,6 @@
 #include "DNBError.h"
 #include "DNBLog.h"
 #include "MachProcess.h"
-#include "PThreadMutex.h"
 #include "SysSignal.h"
 #include <cerrno>
 #include <inttypes.h>
diff --git a/lldb/tools/debugserver/source/MacOSX/MachException.h b/lldb/tools/debugserver/source/MacOSX/MachException.h
index 573e84e991608..2da389c50be61 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachException.h
+++ b/lldb/tools/debugserver/source/MacOSX/MachException.h
@@ -17,7 +17,6 @@
 #include <vector>
 
 class MachProcess;
-class PThreadMutex;
 
 typedef union MachMessageTag {
   mach_msg_header_t hdr;
diff --git a/lldb/tools/debugserver/source/MacOSX/MachTask.h b/lldb/tools/debugserver/source/MacOSX/MachTask.h
index 286a57b9e0dd1..2284f6b99de91 100644
--- a/lldb/tools/debugserver/source/MacOSX/MachTask.h
+++ b/lldb/tools/debugserver/source/MacOSX/MachTask.h
@@ -16,15 +16,14 @@
 #ifndef LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_MACHTASK_H
 #define LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_MACHTASK_H
 
-#include <mach/mach.h>
-#include <sys/socket.h>
-#include <map>
-#include <string>
 #include "DNBDefs.h"
-#include "RNBContext.h"
 #include "MachException.h"
 #include "MachVMMemory.h"
-#include "PThreadMutex.h"
+#include "RNBContext.h"
+#include <mach/mach.h>
+#include <map>
+#include <string>
+#include <sys/socket.h>
 
 class MachProcess;
 
diff --git a/lldb/tools/debugserver/source/PThreadMutex.cpp b/lldb/tools/debugserver/source/PThreadMutex.cpp
deleted file mode 100644
index 118921aee5a81..0000000000000
--- a/lldb/tools/debugserver/source/PThreadMutex.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-//===-- PThreadMutex.cpp ----------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//  Created by Greg Clayton on 12/9/08.
-//
-//===----------------------------------------------------------------------===//
-
-#include "PThreadMutex.h"
-
-#include "DNBTimer.h"
-
-#if defined(DEBUG_PTHREAD_MUTEX_DEADLOCKS)
-
-PThreadMutex::Locker::Locker(PThreadMutex &m, const char *function,
-                             const char *file, const int line)
-    : m_pMutex(m.Mutex()), m_function(function), m_file(file), m_line(line),
-      m_lock_time(0) {
-  Lock();
-}
-
-PThreadMutex::Locker::Locker(PThreadMutex *m, const char *function,
-                             const char *file, const int line)
-    : m_pMutex(m ? m->Mutex() : NULL), m_function(function), m_file(file),
-      m_line(line), m_lock_time(0) {
-  Lock();
-}
-
-PThreadMutex::Locker::Locker(pthread_mutex_t *mutex, const char *function,
-                             const char *file, const int line)
-    : m_pMutex(mutex), m_function(function), m_file(file), m_line(line),
-      m_lock_time(0) {
-  Lock();
-}
-
-PThreadMutex::Locker::~Locker() { Unlock(); }
-
-void PThreadMutex::Locker::Lock() {
-  if (m_pMutex) {
-    m_lock_time = DNBTimer::GetTimeOfDay();
-    if (::pthread_mutex_trylock(m_pMutex) != 0) {
-      fprintf(stdout, "::pthread_mutex_trylock (%8.8p) mutex is locked "
-                      "(function %s in %s:%i), waiting...\n",
-              m_pMutex, m_function, m_file, m_line);
-      ::pthread_mutex_lock(m_pMutex);
-      fprintf(stdout, "::pthread_mutex_lock (%8.8p) succeeded after %6llu "
-                      "usecs (function %s in %s:%i)\n",
-              m_pMutex, DNBTimer::GetTimeOfDay() - m_lock_time, m_function,
-              m_file, m_line);
-    }
-  }
-}
-
-void PThreadMutex::Locker::Unlock() {
-  fprintf(stdout, "::pthread_mutex_unlock (%8.8p) had lock for %6llu usecs in "
-                  "%s in %s:%i\n",
-          m_pMutex, DNBTimer::GetTimeOfDay() - m_lock_time, m_function, m_file,
-          m_line);
-  ::pthread_mutex_unlock(m_pMutex);
-}
-
-#endif
diff --git a/lldb/tools/debugserver/source/PThreadMutex.h b/lldb/tools/debugserver/source/PThreadMutex.h
deleted file mode 100644
index 17f9fdff5f2d3..0000000000000
--- a/lldb/tools/debugserver/source/PThreadMutex.h
+++ /dev/null
@@ -1,119 +0,0 @@
-//===-- PThreadMutex.h ------------------------------------------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-//  Created by Greg Clayton on 6/16/07.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLDB_TOOLS_DEBUGSERVER_SOURCE_PTHREADMUTEX_H
-#define LLDB_TOOLS_DEBUGSERVER_SOURCE_PTHREADMUTEX_H
-
-#include <cassert>
-#include <cstdint>
-#include <pthread.h>
-
-//#define DEBUG_PTHREAD_MUTEX_DEADLOCKS 1
-
-#if defined(DEBUG_PTHREAD_MUTEX_DEADLOCKS)
-#define PTHREAD_MUTEX_LOCKER(var, mutex)                                       \
-  PThreadMutex::Locker var(mutex, __FUNCTION__, __FILE__, __LINE__)
-
-#else
-#define PTHREAD_MUTEX_LOCKER(var, mutex) PThreadMutex::Locker var(mutex)
-#endif
-
-class PThreadMutex {
-public:
-  class Locker {
-  public:
-#if defined(DEBUG_PTHREAD_MUTEX_DEADLOCKS)
-
-    Locker(PThreadMutex &m, const char *function, const char *file, int line);
-    Locker(PThreadMutex *m, const char *function, const char *file, int line);
-    Locker(pthread_mutex_t *mutex, const char *function, const char *file,
-           int line);
-    ~Locker();
-    void Lock();
-    void Unlock();
-
-#else
-    Locker(PThreadMutex &m) : m_pMutex(m.Mutex()) { Lock(); }
-
-    Locker(PThreadMutex *m) : m_pMutex(m ? m->Mutex() : NULL) { Lock(); }
-
-    Locker(pthread_mutex_t *mutex) : m_pMutex(mutex) { Lock(); }
-
-    void Lock() {
-      if (m_pMutex)
-        ::pthread_mutex_lock(m_pMutex);
-    }
-
-    void Unlock() {
-      if (m_pMutex)
-        ::pthread_mutex_unlock(m_pMutex);
-    }
-
-    ~Locker() { Unlock(); }
-
-#endif
-
-    // unlock any the current mutex and lock the new one if it is valid
-    void Reset(pthread_mutex_t *pMutex = NULL) {
-      Unlock();
-      m_pMutex = pMutex;
-      Lock();
-    }
-    pthread_mutex_t *m_pMutex;
-#if defined(DEBUG_PTHREAD_MUTEX_DEADLOCKS)
-    const char *m_function;
-    const char *m_file;
-    int m_line;
-    uint64_t m_lock_time;
-#endif
-  };
-
-  PThreadMutex() {
-    [[maybe_unused]] int err;
-    err = ::pthread_mutex_init(&m_mutex, NULL);
-    assert(err == 0);
-  }
-
-  PThreadMutex(int type) {
-    [[maybe_unused]] int err;
-    ::pthread_mutexattr_t attr;
-    err = ::pthread_mutexattr_init(&attr);
-    assert(err == 0);
-    err = ::pthread_mutexattr_settype(&attr, type);
-    assert(err == 0);
-    err = ::pthread_mutex_init(&m_mutex, &attr);
-    assert(err == 0);
-    err = ::pthread_mutexattr_destroy(&attr);
-    assert(err == 0);
-  }
-
-  ~PThreadMutex() {
-    [[maybe_unused]] int err;
-    err = ::pthread_mutex_destroy(&m_mutex);
-    if (err != 0) {
-      err = Unlock();
-      if (err == 0)
-        ::pthread_mutex_destroy(&m_mutex);
-    }
-  }
-
-  pthread_mutex_t *Mutex() { return &m_mutex; }
-
-  int Lock() { return ::pthread_mutex_lock(&m_mutex); }
-
-  int Unlock() { return ::pthread_mutex_unlock(&m_mutex); }
-
-protected:
-  pthread_mutex_t m_mutex;
-};
-
-#endif

Copy link
Collaborator

@jasonmolenda jasonmolenda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol thanks for updating the xcode project file, it's sometimes handy to build debugserver alone without the rest of lldb.

Now that all uses of PThreadMutex have been migrated to their C++
equivalent, this PR removes PThreadMutex itself.
@JDevlieghere JDevlieghere force-pushed the debugserver-PThreadMutex branch from 1095cfe to 1ebef7a Compare April 28, 2025 17:54
@JDevlieghere JDevlieghere merged commit 9d77a3f into llvm:main Apr 28, 2025
8 of 9 checks passed
@JDevlieghere JDevlieghere deleted the debugserver-PThreadMutex branch April 28, 2025 18:28
@llvm-ci
Copy link
Collaborator

llvm-ci commented Apr 28, 2025

LLVM Buildbot has detected a new failure on builder lldb-arm-ubuntu running on linaro-lldb-arm-ubuntu while building lldb at step 6 "test".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/15188

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
UNSUPPORTED: lldb-api :: tools/lldb-dap/extendedStackTrace/TestDAP_extendedStackTrace.py (1174 of 3001)
PASS: lldb-api :: tools/lldb-dap/disconnect/TestDAP_disconnect.py (1175 of 3001)
PASS: lldb-api :: tools/lldb-dap/instruction-breakpoint/TestDAP_instruction_breakpoint.py (1176 of 3001)
PASS: lldb-api :: tools/lldb-dap/io/TestDAP_io.py (1177 of 3001)
PASS: lldb-api :: tools/lldb-dap/locations/TestDAP_locations.py (1178 of 3001)
PASS: lldb-api :: tools/lldb-dap/memory/TestDAP_memory.py (1179 of 3001)
PASS: lldb-api :: tools/lldb-dap/optimized/TestDAP_optimized.py (1180 of 3001)
PASS: lldb-api :: tools/lldb-dap/output/TestDAP_output.py (1181 of 3001)
PASS: lldb-api :: tools/lldb-dap/launch/TestDAP_launch.py (1182 of 3001)
UNRESOLVED: lldb-api :: tools/lldb-dap/evaluate/TestDAP_evaluate.py (1183 of 3001)
******************** TEST 'lldb-api :: tools/lldb-dap/evaluate/TestDAP_evaluate.py' FAILED ********************
Script:
--
/usr/bin/python3.10 /home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./lib --env LLVM_INCLUDE_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/include --env LLVM_TOOLS_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin --arch armv8l --build-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex --lldb-module-cache-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/lldb --compiler /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/clang --dsymutil /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/dsymutil --make /usr/bin/gmake --llvm-tools-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin --lldb-obj-root /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/lldb --lldb-libs-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./lib /home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/tools/lldb-dap/evaluate -p TestDAP_evaluate.py
--
Exit Code: 1

Command Output (stdout):
--
lldb version 21.0.0git (https://github.com/llvm/llvm-project.git revision 9d77a3fa1a4a68a533090266662863d32e9d5717)
  clang revision 9d77a3fa1a4a68a533090266662863d32e9d5717
  llvm revision 9d77a3fa1a4a68a533090266662863d32e9d5717
Skipping the following test categories: ['libc++', 'dsym', 'gmodules', 'debugserver', 'objc']

--
Command Output (stderr):
--
PASS: LLDB (/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/bin/clang-arm) :: test_generic_evaluate_expressions (TestDAP_evaluate.TestDAP_evaluate)
========= DEBUG ADAPTER PROTOCOL LOGS =========
1745866590.838022947 --> (stdin/stdout) {"command":"initialize","type":"request","arguments":{"adapterID":"lldb-native","clientID":"vscode","columnsStartAt1":true,"linesStartAt1":true,"locale":"en-us","pathFormat":"path","supportsRunInTerminalRequest":true,"supportsVariablePaging":true,"supportsVariableType":true,"supportsStartDebuggingRequest":true,"supportsProgressReporting":true,"$__lldb_sourceInitFile":false},"seq":1}
1745866590.844928265 <-- (stdin/stdout) {"body":{"$__lldb_version":"lldb version 21.0.0git (https://github.com/llvm/llvm-project.git revision 9d77a3fa1a4a68a533090266662863d32e9d5717)\n  clang revision 9d77a3fa1a4a68a533090266662863d32e9d5717\n  llvm revision 9d77a3fa1a4a68a533090266662863d32e9d5717","completionTriggerCharacters":["."," ","\t"],"exceptionBreakpointFilters":[{"default":false,"filter":"cpp_catch","label":"C++ Catch"},{"default":false,"filter":"cpp_throw","label":"C++ Throw"},{"default":false,"filter":"objc_catch","label":"Objective-C Catch"},{"default":false,"filter":"objc_throw","label":"Objective-C Throw"}],"supportTerminateDebuggee":true,"supportsBreakpointLocationsRequest":true,"supportsCancelRequest":true,"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDataBreakpoints":true,"supportsDelayedStackTraceLoading":true,"supportsDisassembleRequest":true,"supportsEvaluateForHovers":true,"supportsExceptionInfoRequest":true,"supportsExceptionOptions":true,"supportsFunctionBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsInstructionBreakpoints":true,"supportsLogPoints":true,"supportsModulesRequest":true,"supportsReadMemoryRequest":true,"supportsRestartRequest":true,"supportsSetVariable":true,"supportsStepInTargetsRequest":true,"supportsSteppingGranularity":true,"supportsValueFormattingOptions":true},"command":"initialize","request_seq":1,"seq":0,"success":true,"type":"response"}
1745866590.845978260 --> (stdin/stdout) {"command":"launch","type":"request","arguments":{"program":"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/tools/lldb-dap/evaluate/TestDAP_evaluate.test_generic_evaluate_expressions/a.out","initCommands":["settings clear -all","settings set symbols.enable-external-lookup false","settings set target.inherit-tcc true","settings set target.disable-aslr false","settings set target.detach-on-error false","settings set target.auto-apply-fixits false","settings set plugin.process.gdb-remote.packet-timeout 60","settings set symbols.clang-modules-cache-path \"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api\"","settings set use-color false","settings set show-statusline false"],"disableASLR":false,"enableAutoVariableSummaries":false,"enableSyntheticChildDebugging":false,"displayExtendedBacktrace":false},"seq":2}
1745866590.846920013 <-- (stdin/stdout) {"body":{"category":"console","output":"Running initCommands:\n"},"event":"output","seq":0,"type":"event"}
1745866590.847006559 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings clear -all\n"},"event":"output","seq":0,"type":"event"}
1745866590.847029448 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set symbols.enable-external-lookup false\n"},"event":"output","seq":0,"type":"event"}
1745866590.847045422 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set target.inherit-tcc true\n"},"event":"output","seq":0,"type":"event"}
1745866590.847060680 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set target.disable-aslr false\n"},"event":"output","seq":0,"type":"event"}
1745866590.847074509 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set target.detach-on-error false\n"},"event":"output","seq":0,"type":"event"}
1745866590.847088099 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set target.auto-apply-fixits false\n"},"event":"output","seq":0,"type":"event"}
1745866590.847101927 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set plugin.process.gdb-remote.packet-timeout 60\n"},"event":"output","seq":0,"type":"event"}
1745866590.847150326 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set symbols.clang-modules-cache-path \"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api\"\n"},"event":"output","seq":0,"type":"event"}
1745866590.847168207 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set use-color false\n"},"event":"output","seq":0,"type":"event"}
1745866590.847184181 <-- (stdin/stdout) {"body":{"category":"console","output":"(lldb) settings set show-statusline false\n"},"event":"output","seq":0,"type":"event"}
1745866591.036450863 <-- (stdin/stdout) {"command":"launch","request_seq":2,"seq":0,"success":true,"type":"response"}
1745866591.036535740 <-- (stdin/stdout) {"body":{"module":{"addressRange":"4157734912","debugInfoSize":"983.3KB","id":"0D794E6C-AF7E-D8CB-B9BA-E385B4F8753F-5A793D65","name":"ld-linux-armhf.so.3","path":"/usr/lib/arm-linux-gnueabihf/ld-linux-armhf.so.3","symbolFilePath":"/usr/lib/arm-linux-gnueabihf/ld-linux-armhf.so.3","symbolStatus":"Symbols loaded."},"reason":"new"},"event":"module","seq":0,"type":"event"}
1745866591.037837744 <-- (stdin/stdout) {"body":{"isLocalProcess":true,"name":"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/tools/lldb-dap/evaluate/TestDAP_evaluate.test_generic_evaluate_expressions/a.out","startMethod":"launch","systemProcessId":3756765},"event":"process","seq":0,"type":"event"}
1745866591.037859678 <-- (stdin/stdout) {"event":"initialized","seq":0,"type":"event"}
1745866591.038218498 <-- (stdin/stdout) {"body":{"module":{"addressRange":"10354688","debugInfoSize":"98.8KB","id":"D352D125","name":"a.out","path":"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/tools/lldb-dap/evaluate/TestDAP_evaluate.test_generic_evaluate_expressions/a.out","symbolFilePath":"/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/tools/lldb-dap/evaluate/TestDAP_evaluate.test_generic_evaluate_expressions/a.out","symbolStatus":"Symbols loaded."},"reason":"new"},"event":"module","seq":0,"type":"event"}
1745866591.039076567 --> (stdin/stdout) {"command":"setBreakpoints","type":"request","arguments":{"source":{"name":"main.cpp","path":"main.cpp"},"sourceModified":false,"lines":[25,29,12,37,42,46,47,50],"breakpoints":[{"line":25},{"line":29},{"line":12},{"line":37},{"line":42},{"line":46},{"line":47},{"line":50}]},"seq":3}

IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
Now that all uses of PThreadMutex have been migrated to their C++
equivalent, this PR removes PThreadMutex itself.
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
Now that all uses of PThreadMutex have been migrated to their C++
equivalent, this PR removes PThreadMutex itself.
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
Now that all uses of PThreadMutex have been migrated to their C++
equivalent, this PR removes PThreadMutex itself.
GeorgeARM pushed a commit to GeorgeARM/llvm-project that referenced this pull request May 7, 2025
Now that all uses of PThreadMutex have been migrated to their C++
equivalent, this PR removes PThreadMutex itself.
Ankur-0429 pushed a commit to Ankur-0429/llvm-project that referenced this pull request May 9, 2025
Now that all uses of PThreadMutex have been migrated to their C++
equivalent, this PR removes PThreadMutex itself.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants