[Lldb-commits] [lldb] 24b1831 - [lldb] Fix windows&freebsd builds for c0b1af68

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 9 06:58:29 PDT 2020


Author: Pavel Labath
Date: 2020-03-09T14:55:43+01:00
New Revision: 24b1831ebfb50a2ded01506049d6c1c2f34c4a27

URL: https://github.com/llvm/llvm-project/commit/24b1831ebfb50a2ded01506049d6c1c2f34c4a27
DIFF: https://github.com/llvm/llvm-project/commit/24b1831ebfb50a2ded01506049d6c1c2f34c4a27.diff

LOG: [lldb] Fix windows&freebsd builds for c0b1af68

Added: 
    

Modified: 
    lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
    lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.h
    lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp
    lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.h

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp b/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
index 7d6ecf0b445a..c01ab750b948 100644
--- a/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
@@ -26,7 +26,6 @@
 #include "Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.h"
 #include "Plugins/Process/Utility/RegisterInfoPOSIX_arm.h"
 #include "Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h"
-#include "Plugins/Process/Utility/UnwindLLDB.h"
 #include "ProcessFreeBSD.h"
 #include "ProcessMonitor.h"
 #include "RegisterContextPOSIXProcessMonitor_arm.h"
@@ -254,8 +253,7 @@ FreeBSDThread::CreateRegisterContextForFrame(lldb_private::StackFrame *frame) {
   if (concrete_frame_idx == 0)
     reg_ctx_sp = GetRegisterContext();
   else {
-    assert(GetUnwinder());
-    reg_ctx_sp = GetUnwinder()->CreateRegisterContextForFrame(frame);
+    reg_ctx_sp = GetUnwinder().CreateRegisterContextForFrame(frame);
   }
 
   return reg_ctx_sp;
@@ -275,13 +273,6 @@ bool FreeBSDThread::CalculateStopInfo() {
   return true;
 }
 
-Unwind *FreeBSDThread::GetUnwinder() {
-  if (!m_unwinder_up)
-    m_unwinder_up.reset(new UnwindLLDB(*this));
-
-  return m_unwinder_up.get();
-}
-
 void FreeBSDThread::DidStop() {
   // Don't set the thread state to stopped unless we really stopped.
 }

diff  --git a/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.h b/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.h
index 6d3c253a519e..774ffb511bc6 100644
--- a/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.h
+++ b/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.h
@@ -102,8 +102,6 @@ class FreeBSDThread : public lldb_private::Thread {
   void ExitNotify(const ProcessMessage &message);
   void ExecNotify(const ProcessMessage &message);
 
-  lldb_private::Unwind *GetUnwinder() override;
-
   // FreeBSDThread internal API.
 
   // POSIXThread override

diff  --git a/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp
index 8e700ced97e5..782edfe68279 100644
--- a/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp
@@ -15,7 +15,6 @@
 #include "lldb/Utility/Logging.h"
 #include "lldb/Utility/State.h"
 
-#include "Plugins/Process/Utility/UnwindLLDB.h"
 #include "ProcessWindows.h"
 #include "ProcessWindowsLog.h"
 #include "TargetThreadWindows.h"
@@ -113,9 +112,7 @@ TargetThreadWindows::CreateRegisterContextForFrame(StackFrame *frame) {
     }
     reg_ctx_sp = m_thread_reg_ctx_sp;
   } else {
-    Unwind *unwinder = GetUnwinder();
-    if (unwinder != nullptr)
-      reg_ctx_sp = unwinder->CreateRegisterContextForFrame(frame);
+    reg_ctx_sp = GetUnwinder().CreateRegisterContextForFrame(frame);
   }
 
   return reg_ctx_sp;
@@ -126,14 +123,6 @@ bool TargetThreadWindows::CalculateStopInfo() {
   return true;
 }
 
-Unwind *TargetThreadWindows::GetUnwinder() {
-  // FIXME: Implement an unwinder based on the Windows unwinder exposed through
-  // DIA SDK.
-  if (!m_unwinder_up)
-    m_unwinder_up.reset(new UnwindLLDB(*this));
-  return m_unwinder_up.get();
-}
-
 Status TargetThreadWindows::DoResume() {
   StateType resume_state = GetTemporaryResumeState();
   StateType current_state = GetState();

diff  --git a/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.h b/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.h
index fc68cb73db91..2845847738f6 100644
--- a/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.h
+++ b/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.h
@@ -34,7 +34,6 @@ class TargetThreadWindows : public lldb_private::Thread {
   lldb::RegisterContextSP
   CreateRegisterContextForFrame(StackFrame *frame) override;
   bool CalculateStopInfo() override;
-  Unwind *GetUnwinder() override;
 
   Status DoResume();
 


        


More information about the lldb-commits mailing list