[Lldb-commits] [lldb] r222226 - Fix up the code in the FuncUnwinders class that

Jason Molenda jmolenda at apple.com
Mon Nov 17 21:57:42 PST 2014


Author: jmolenda
Date: Mon Nov 17 23:57:42 2014
New Revision: 222226

URL: http://llvm.org/viewvc/llvm-project?rev=222226&view=rev
Log:
Fix up the code in the FuncUnwinders class that
retrieves the personality routine addr and the
LSDA addr.  Don't bother checking with the
"non-call site" unwind plan - this kind of
information is only going to come from the 
call site unwind plan.

Modified:
    lldb/trunk/include/lldb/Symbol/FuncUnwinders.h
    lldb/trunk/source/Symbol/FuncUnwinders.cpp

Modified: lldb/trunk/include/lldb/Symbol/FuncUnwinders.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/FuncUnwinders.h?rev=222226&r1=222225&r2=222226&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/FuncUnwinders.h (original)
+++ lldb/trunk/include/lldb/Symbol/FuncUnwinders.h Mon Nov 17 23:57:42 2014
@@ -73,14 +73,14 @@ public:
     // If any of the UnwindPlans have the address of the LSDA region for this function,
     // this will return it.  
     Address
-    GetLSDAAddress () const;
+    GetLSDAAddress ();
 
     // A function may have a Personality Routine associated with it -- used in the
     // processing of throwing an exception.  If any of the UnwindPlans have the
     // address of the personality routine, this will return it.  Read the target-pointer
     // at this address to get the personality function address.
     Address
-    GetPersonalityRoutinePtrAddress () const;
+    GetPersonalityRoutinePtrAddress ();
 
 private:
 

Modified: lldb/trunk/source/Symbol/FuncUnwinders.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/FuncUnwinders.cpp?rev=222226&r1=222225&r2=222226&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/FuncUnwinders.cpp (original)
+++ lldb/trunk/source/Symbol/FuncUnwinders.cpp Mon Nov 17 23:57:42 2014
@@ -211,16 +211,16 @@ FuncUnwinders::GetUnwindAssemblyProfiler
 }
 
 Address
-FuncUnwinders::GetLSDAAddress () const
+FuncUnwinders::GetLSDAAddress ()
 {
     Address lsda_addr;
-    if (m_unwind_plan_non_call_site_sp->GetLSDAAddress().IsValid())
-    {
-        lsda_addr = m_unwind_plan_non_call_site_sp->GetLSDAAddress().IsValid();
-    }
-    else if (m_unwind_plan_call_site_sp->GetLSDAAddress().IsValid())
+    Mutex::Locker locker (m_mutex);
+
+    GetUnwindPlanAtCallSite (-1);
+
+    if (m_unwind_plan_call_site_sp && m_unwind_plan_call_site_sp->GetLSDAAddress().IsValid())
     {
-        lsda_addr = m_unwind_plan_non_call_site_sp->GetLSDAAddress().IsValid();
+        lsda_addr = m_unwind_plan_call_site_sp->GetLSDAAddress().IsValid();
     }
 
     return lsda_addr;
@@ -228,16 +228,16 @@ FuncUnwinders::GetLSDAAddress () const
 
 
 Address
-FuncUnwinders::GetPersonalityRoutinePtrAddress () const
+FuncUnwinders::GetPersonalityRoutinePtrAddress ()
 {
     Address personality_addr;
-    if (m_unwind_plan_non_call_site_sp->GetPersonalityFunctionPtr().IsValid())
-    {
-        personality_addr = m_unwind_plan_non_call_site_sp->GetPersonalityFunctionPtr().IsValid();
-    }
-    else if (m_unwind_plan_call_site_sp->GetPersonalityFunctionPtr().IsValid())
+    Mutex::Locker locker (m_mutex);
+
+    GetUnwindPlanAtCallSite (-1);
+
+    if (m_unwind_plan_call_site_sp && m_unwind_plan_call_site_sp->GetPersonalityFunctionPtr().IsValid())
     {
-        personality_addr = m_unwind_plan_non_call_site_sp->GetPersonalityFunctionPtr().IsValid();
+        personality_addr = m_unwind_plan_call_site_sp->GetPersonalityFunctionPtr().IsValid();
     }
 
     return personality_addr;





More information about the lldb-commits mailing list