summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/FuncUnwinders.cpp
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2014-11-18 02:27:42 +0000
committerJason Molenda <jmolenda@apple.com>2014-11-18 02:27:42 +0000
commite9c7ecf66ef6f62c79e0b1bdb0a66b2fe3192b0c (patch)
tree75448247829b6549c60b2e6f9abf300d8c957021 /lldb/source/Symbol/FuncUnwinders.cpp
parent9a91e4a18ab4ca06af1f03a1b7c80e74dcac2e52 (diff)
downloadbcm5719-llvm-e9c7ecf66ef6f62c79e0b1bdb0a66b2fe3192b0c.tar.gz
bcm5719-llvm-e9c7ecf66ef6f62c79e0b1bdb0a66b2fe3192b0c.zip
Read the LSDA and Personality Routine function address out of the
eh_frame data. These two pieces of information are used in the process of exception handler unwinding on SysV ABI systems. This patch reads the data from the eh_frame section (DWARFCallFrameInfo.cpp), allows for it to be saved & read out of a given UnwindPlan (UnwindPlan.h, UnwindPlan.cpp) - as well as printing the information in the UnwindPlan::Dump method - and adds methods to the FuncUnwinders object so that higher levels can query if a given function has an LSDA / personality routine defined. It's only lightly tested, but seems to be working correctly as long as your have this information in eh_frame. Does not address getting this information from compact unwind yet on Darwin systems. <rdar://problem/18742797> llvm-svn: 222214
Diffstat (limited to 'lldb/source/Symbol/FuncUnwinders.cpp')
-rw-r--r--lldb/source/Symbol/FuncUnwinders.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/lldb/source/Symbol/FuncUnwinders.cpp b/lldb/source/Symbol/FuncUnwinders.cpp
index bee84cba748..2c4797916b1 100644
--- a/lldb/source/Symbol/FuncUnwinders.cpp
+++ b/lldb/source/Symbol/FuncUnwinders.cpp
@@ -209,3 +209,36 @@ FuncUnwinders::GetUnwindAssemblyProfiler ()
}
return assembly_profiler_sp;
}
+
+Address
+FuncUnwinders::GetLSDAAddress () const
+{
+ 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())
+ {
+ lsda_addr = m_unwind_plan_non_call_site_sp->GetLSDAAddress().IsValid();
+ }
+
+ return lsda_addr;
+}
+
+
+Address
+FuncUnwinders::GetPersonalityRoutinePtrAddress () const
+{
+ 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())
+ {
+ personality_addr = m_unwind_plan_non_call_site_sp->GetPersonalityFunctionPtr().IsValid();
+ }
+
+ return personality_addr;
+}
OpenPOWER on IntegriCloud