[Lldb-commits] [lldb] 9da81ce - lldb unused var fix for NetBSD < 10. (#93377)

via lldb-commits lldb-commits at lists.llvm.org
Sat May 25 07:49:45 PDT 2024


Author: David CARLIER
Date: 2024-05-25T15:49:42+01:00
New Revision: 9da81cee219da78ab44357310a3bcf481bdba26c

URL: https://github.com/llvm/llvm-project/commit/9da81cee219da78ab44357310a3bcf481bdba26c
DIFF: https://github.com/llvm/llvm-project/commit/9da81cee219da78ab44357310a3bcf481bdba26c.diff

LOG: lldb unused var fix for NetBSD < 10. (#93377)

Added: 
    

Modified: 
    lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp b/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
index f561c21b9d91c..77b4301ea22e5 100644
--- a/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
+++ b/lldb/source/Plugins/Process/NetBSD/NativeThreadNetBSD.cpp
@@ -180,8 +180,6 @@ void NativeThreadNetBSD::SetStepping() {
 }
 
 std::string NativeThreadNetBSD::GetName() {
-  Log *log = GetLog(POSIXLog::Thread);
-
 #ifdef PT_LWPSTATUS
   struct ptrace_lwpstatus info = {};
   info.pl_lwpid = m_tid;
@@ -193,6 +191,8 @@ std::string NativeThreadNetBSD::GetName() {
   return info.pl_name;
 #else
   std::vector<struct kinfo_lwp> infos;
+  Log *log = GetLog(POSIXLog::Thread);
+
   int mib[5] = {CTL_KERN, KERN_LWP, static_cast<int>(m_process.GetID()),
                 sizeof(struct kinfo_lwp), 0};
   size_t size;


        


More information about the lldb-commits mailing list